diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 8e13a08c..1f650b9e 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: 82a4a9784fb0e66e1c64f130701cdd08 + docChecksum: 5e039359563b41bbe118fc6701ba22dc docVersion: 0.0.3 - speakeasyVersion: 1.401.2 - generationVersion: 2.421.3 - releaseVersion: 0.4.1 - configChecksum: d362191bb9eeead9c4fa178fdaaeece8 + speakeasyVersion: 1.402.14 + generationVersion: 2.422.22 + releaseVersion: 0.5.0 + configChecksum: 1e077922ecb4295a2f75526fffe0b239 repoURL: https://github.com/LukeHagar/plexjava.git published: true features: java: additionalDependencies: 0.1.0 constsAndDefaults: 0.1.1 - core: 3.30.1 + core: 3.30.2 deprecations: 2.81.1 downloadStreams: 0.1.1 enums: 2.81.2 @@ -28,7 +28,6 @@ features: nameOverrides: 2.81.3 nullables: 0.1.0 sdkHooks: 0.1.0 - unions: 0.0.5 generatedFiles: - .gitattributes - CONTRIBUTING.md @@ -161,10 +160,10 @@ generatedFiles: - docs/models/errors/GetPlaylistsErrors.md - docs/models/errors/GetPlaylistsPlaylistsErrors.md - docs/models/errors/GetPlaylistsUnauthorized.md - - docs/models/errors/GetRecentlyAddedBadRequest.md - - docs/models/errors/GetRecentlyAddedErrors.md + - docs/models/errors/GetRecentlyAddedLibraryBadRequest.md - docs/models/errors/GetRecentlyAddedLibraryErrors.md - - docs/models/errors/GetRecentlyAddedUnauthorized.md + - docs/models/errors/GetRecentlyAddedLibraryLibraryErrors.md + - docs/models/errors/GetRecentlyAddedLibraryUnauthorized.md - docs/models/errors/GetRefreshLibraryMetadataBadRequest.md - docs/models/errors/GetRefreshLibraryMetadataErrors.md - docs/models/errors/GetRefreshLibraryMetadataLibraryErrors.md @@ -411,11 +410,15 @@ generatedFiles: - docs/models/operations/GetHomeDataResponse.md - docs/models/operations/GetHomeDataResponseBody.md - docs/models/operations/GetLibraryDetailsDirectory.md + - docs/models/operations/GetLibraryDetailsField.md + - docs/models/operations/GetLibraryDetailsFieldType.md - docs/models/operations/GetLibraryDetailsFilter.md - docs/models/operations/GetLibraryDetailsMediaContainer.md + - docs/models/operations/GetLibraryDetailsOperator.md - docs/models/operations/GetLibraryDetailsRequest.md - docs/models/operations/GetLibraryDetailsResponse.md - docs/models/operations/GetLibraryDetailsResponseBody.md + - docs/models/operations/GetLibraryDetailsSort.md - docs/models/operations/GetLibraryDetailsType.md - docs/models/operations/GetLibraryHubsCountry.md - docs/models/operations/GetLibraryHubsDirector.md @@ -430,26 +433,48 @@ generatedFiles: - docs/models/operations/GetLibraryHubsResponseBody.md - docs/models/operations/GetLibraryHubsRole.md - docs/models/operations/GetLibraryHubsWriter.md + - docs/models/operations/GetLibraryItemsActiveDirection.md + - docs/models/operations/GetLibraryItemsCollection.md - docs/models/operations/GetLibraryItemsCountry.md + - docs/models/operations/GetLibraryItemsDefaultDirection.md - docs/models/operations/GetLibraryItemsDirector.md - docs/models/operations/GetLibraryItemsField.md - docs/models/operations/GetLibraryItemsFieldType.md - docs/models/operations/GetLibraryItemsFilter.md + - docs/models/operations/GetLibraryItemsFlattenSeasons.md - docs/models/operations/GetLibraryItemsGenre.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/GetLibraryItemsLibraryResponseType.md + - docs/models/operations/GetLibraryItemsLibrarySort.md - docs/models/operations/GetLibraryItemsLibraryType.md - docs/models/operations/GetLibraryItemsMedia.md - docs/models/operations/GetLibraryItemsMediaContainer.md + - docs/models/operations/GetLibraryItemsMediaGuid.md + - docs/models/operations/GetLibraryItemsMeta.md + - docs/models/operations/GetLibraryItemsMetaDataRating.md - docs/models/operations/GetLibraryItemsMetadata.md - docs/models/operations/GetLibraryItemsOperator.md + - docs/models/operations/GetLibraryItemsOptimizedForStreaming.md - docs/models/operations/GetLibraryItemsPart.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/GetLibraryItemsShowOrdering.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 - docs/models/operations/GetMediaProvidersDirectory.md - docs/models/operations/GetMediaProvidersMediaContainer.md @@ -467,6 +492,7 @@ generatedFiles: - docs/models/operations/GetMetaDataByRatingKeyResponse.md - docs/models/operations/GetMetaDataByRatingKeyResponseBody.md - docs/models/operations/GetMetaDataByRatingKeyRole.md + - docs/models/operations/GetMetaDataByRatingKeyStream.md - docs/models/operations/GetMetaDataByRatingKeyWriter.md - docs/models/operations/GetMetadataChildrenDirectory.md - docs/models/operations/GetMetadataChildrenMediaContainer.md @@ -510,11 +536,36 @@ generatedFiles: - docs/models/operations/GetPlaylistsRequest.md - docs/models/operations/GetPlaylistsResponse.md - docs/models/operations/GetPlaylistsResponseBody.md + - docs/models/operations/GetRecentlyAddedActiveDirection.md + - docs/models/operations/GetRecentlyAddedDefaultDirection.md + - docs/models/operations/GetRecentlyAddedField.md + - docs/models/operations/GetRecentlyAddedFieldType.md + - docs/models/operations/GetRecentlyAddedFilter.md + - docs/models/operations/GetRecentlyAddedHubsResponseType.md + - docs/models/operations/GetRecentlyAddedHubsType.md + - docs/models/operations/GetRecentlyAddedImage.md + - docs/models/operations/GetRecentlyAddedLibraryCountry.md + - docs/models/operations/GetRecentlyAddedLibraryDirector.md + - docs/models/operations/GetRecentlyAddedLibraryFilter.md + - docs/models/operations/GetRecentlyAddedLibraryGenre.md + - docs/models/operations/GetRecentlyAddedLibraryMedia.md + - docs/models/operations/GetRecentlyAddedLibraryMediaContainer.md + - docs/models/operations/GetRecentlyAddedLibraryMetadata.md + - docs/models/operations/GetRecentlyAddedLibraryPart.md + - docs/models/operations/GetRecentlyAddedLibraryRequest.md + - docs/models/operations/GetRecentlyAddedLibraryResponse.md + - docs/models/operations/GetRecentlyAddedLibraryResponseBody.md + - docs/models/operations/GetRecentlyAddedLibraryRole.md + - docs/models/operations/GetRecentlyAddedLibraryType.md + - docs/models/operations/GetRecentlyAddedLibraryWriter.md - docs/models/operations/GetRecentlyAddedMediaContainer.md - docs/models/operations/GetRecentlyAddedMetadata.md + - docs/models/operations/GetRecentlyAddedOperator.md - docs/models/operations/GetRecentlyAddedRequest.md - docs/models/operations/GetRecentlyAddedResponse.md - docs/models/operations/GetRecentlyAddedResponseBody.md + - docs/models/operations/GetRecentlyAddedSort.md + - docs/models/operations/GetRecentlyAddedType.md - docs/models/operations/GetRefreshLibraryMetadataRequest.md - docs/models/operations/GetRefreshLibraryMetadataResponse.md - docs/models/operations/GetResizedPhotoRequest.md @@ -525,6 +576,7 @@ generatedFiles: - docs/models/operations/GetResourcesStatisticsResponseBody.md - docs/models/operations/GetSearchLibraryMediaContainer.md - docs/models/operations/GetSearchLibraryMetadata.md + - docs/models/operations/GetSearchLibraryQueryParamType.md - docs/models/operations/GetSearchLibraryRequest.md - docs/models/operations/GetSearchLibraryResponse.md - docs/models/operations/GetSearchLibraryResponseBody.md @@ -629,7 +681,6 @@ generatedFiles: - docs/models/operations/IncludeRelay.md - docs/models/operations/InternalPaymentMethod.md - docs/models/operations/Level.md - - docs/models/operations/LibrarySectionID.md - docs/models/operations/Libtype.md - docs/models/operations/Location.md - docs/models/operations/LogLineRequest.md @@ -646,11 +697,13 @@ generatedFiles: - 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 - docs/models/operations/OnlyTransient.md - docs/models/operations/Operator.md + - docs/models/operations/OptimizedForStreaming.md - docs/models/operations/Part.md - docs/models/operations/PastSubscription.md - docs/models/operations/PathParamTaskName.md @@ -672,6 +725,7 @@ generatedFiles: - docs/models/operations/PostUsersSignInDataFeatures.md - docs/models/operations/PostUsersSignInDataMailingListStatus.md - docs/models/operations/PostUsersSignInDataMediaReviewsVisibility.md + - docs/models/operations/PostUsersSignInDataRequest.md - docs/models/operations/PostUsersSignInDataRequestBody.md - docs/models/operations/PostUsersSignInDataResponse.md - docs/models/operations/PostUsersSignInDataServices.md @@ -686,6 +740,7 @@ generatedFiles: - docs/models/operations/Provider.md - docs/models/operations/QueryParamFilter.md - docs/models/operations/QueryParamForce.md + - docs/models/operations/QueryParamIncludeMeta.md - docs/models/operations/QueryParamOnlyTransient.md - docs/models/operations/QueryParamSmart.md - docs/models/operations/QueryParamType.md @@ -909,10 +964,10 @@ generatedFiles: - src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistsErrors.java - src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistsPlaylistsErrors.java - src/main/java/dev/plexapi/sdk/models/errors/GetPlaylistsUnauthorized.java - - src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedBadRequest.java - - src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedErrors.java + - src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedLibraryBadRequest.java - src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedLibraryErrors.java - - src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedUnauthorized.java + - src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedLibraryLibraryErrors.java + - src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedLibraryUnauthorized.java - src/main/java/dev/plexapi/sdk/models/errors/GetRefreshLibraryMetadataBadRequest.java - src/main/java/dev/plexapi/sdk/models/errors/GetRefreshLibraryMetadataErrors.java - src/main/java/dev/plexapi/sdk/models/errors/GetRefreshLibraryMetadataLibraryErrors.java @@ -1180,12 +1235,16 @@ generatedFiles: - src/main/java/dev/plexapi/sdk/models/operations/GetHomeDataResponse.java - src/main/java/dev/plexapi/sdk/models/operations/GetHomeDataResponseBody.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsDirectory.java + - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsField.java + - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsFieldType.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsFilter.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsOperator.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsRequest.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsResponse.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsSort.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsType.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsCountry.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsDirector.java @@ -1201,27 +1260,49 @@ generatedFiles: - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsResponseBody.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsRole.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryHubsWriter.java + - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsActiveDirection.java + - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsCollection.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsCountry.java + - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsDefaultDirection.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsDirector.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsField.java - 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/GetLibraryItemsFlattenSeasons.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsGenre.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/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/GetLibraryItemsMedia.java - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMediaGuid.java + - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMeta.java + - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMetaDataRating.java - 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/GetLibraryItemsPart.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 - src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsRequestBuilder.java - 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/GetLibraryItemsShowOrdering.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 - src/main/java/dev/plexapi/sdk/models/operations/GetMediaProvidersDirectory.java - src/main/java/dev/plexapi/sdk/models/operations/GetMediaProvidersMediaContainer.java @@ -1241,6 +1322,7 @@ generatedFiles: - src/main/java/dev/plexapi/sdk/models/operations/GetMetaDataByRatingKeyResponse.java - src/main/java/dev/plexapi/sdk/models/operations/GetMetaDataByRatingKeyResponseBody.java - src/main/java/dev/plexapi/sdk/models/operations/GetMetaDataByRatingKeyRole.java + - src/main/java/dev/plexapi/sdk/models/operations/GetMetaDataByRatingKeyStream.java - src/main/java/dev/plexapi/sdk/models/operations/GetMetaDataByRatingKeyWriter.java - src/main/java/dev/plexapi/sdk/models/operations/GetMetadataChildrenDirectory.java - src/main/java/dev/plexapi/sdk/models/operations/GetMetadataChildrenMediaContainer.java @@ -1291,12 +1373,38 @@ generatedFiles: - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistsRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistsResponse.java - src/main/java/dev/plexapi/sdk/models/operations/GetPlaylistsResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedActiveDirection.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedDefaultDirection.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedField.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedFieldType.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedFilter.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedHubsResponseType.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedHubsType.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedImage.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryCountry.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryDirector.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryFilter.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryGenre.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryMedia.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryMediaContainer.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryMetadata.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryPart.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryRequest.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryRequestBuilder.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryResponse.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryRole.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryType.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryWriter.java - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedMediaContainer.java - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedMetadata.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedOperator.java - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedRequest.java - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedResponse.java - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedResponseBody.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedSort.java + - src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedType.java - src/main/java/dev/plexapi/sdk/models/operations/GetRefreshLibraryMetadataRequest.java - src/main/java/dev/plexapi/sdk/models/operations/GetRefreshLibraryMetadataRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations/GetRefreshLibraryMetadataResponse.java @@ -1310,6 +1418,7 @@ generatedFiles: - src/main/java/dev/plexapi/sdk/models/operations/GetResourcesStatisticsResponseBody.java - src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryMediaContainer.java - src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryMetadata.java + - src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryQueryParamType.java - src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryRequest.java - src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryResponse.java @@ -1436,7 +1545,6 @@ generatedFiles: - src/main/java/dev/plexapi/sdk/models/operations/IncludeRelay.java - src/main/java/dev/plexapi/sdk/models/operations/InternalPaymentMethod.java - src/main/java/dev/plexapi/sdk/models/operations/Level.java - - src/main/java/dev/plexapi/sdk/models/operations/LibrarySectionID.java - src/main/java/dev/plexapi/sdk/models/operations/Libtype.java - src/main/java/dev/plexapi/sdk/models/operations/Location.java - src/main/java/dev/plexapi/sdk/models/operations/LogLineRequest.java @@ -1457,11 +1565,13 @@ generatedFiles: - 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 - src/main/java/dev/plexapi/sdk/models/operations/OnlyTransient.java - src/main/java/dev/plexapi/sdk/models/operations/Operator.java + - src/main/java/dev/plexapi/sdk/models/operations/OptimizedForStreaming.java - src/main/java/dev/plexapi/sdk/models/operations/Part.java - src/main/java/dev/plexapi/sdk/models/operations/PastSubscription.java - src/main/java/dev/plexapi/sdk/models/operations/PathParamTaskName.java @@ -1485,6 +1595,7 @@ generatedFiles: - src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataFeatures.java - src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataMailingListStatus.java - src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataMediaReviewsVisibility.java + - src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequest.java - src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequestBody.java - src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequestBuilder.java - src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataResponse.java @@ -1500,6 +1611,7 @@ generatedFiles: - src/main/java/dev/plexapi/sdk/models/operations/Provider.java - src/main/java/dev/plexapi/sdk/models/operations/QueryParamFilter.java - src/main/java/dev/plexapi/sdk/models/operations/QueryParamForce.java + - src/main/java/dev/plexapi/sdk/models/operations/QueryParamIncludeMeta.java - src/main/java/dev/plexapi/sdk/models/operations/QueryParamOnlyTransient.java - src/main/java/dev/plexapi/sdk/models/operations/QueryParamSmart.java - src/main/java/dev/plexapi/sdk/models/operations/QueryParamType.java @@ -1920,6 +2032,7 @@ examples: X-Plex-Device: "Linux" X-Plex-Version: "4.133.0" X-Plex-Platform: "Chrome" + X-Plex-Client-Identifier: "gcgzw5rz2xovp84b4vha3a40" responses: "200": application/json: {"id": 308667304, "code": "7RQZ", "product": "0", "trusted": false, "qr": "https://plex.tv/api/v2/pins/qr/7RQZ", "clientIdentifier": "string", "location": {"code": "VI", "continent_code": "NA", "country": "United States Virgin Islands", "city": "Amsterdam", "european_union_member": true, "time_zone": "America/St_Thomas", "postal_code": 802, "in_privacy_restricted_country": true, "in_privacy_restricted_region": true, "subdivisions": "Saint Thomas", "coordinates": "18.3381, -64.8941"}, "expiresIn": 876, "createdAt": "2024-07-16T17:03:05Z", "expiresAt": "2024-07-16T17:18:05Z", "authToken": null, "newRegistration": null} @@ -2083,7 +2196,7 @@ examples: X-Plex-Container-Size: 50 responses: "200": - application/json: {"MediaContainer": {"size": 70, "totalSize": 170, "offset": 0, "content": "secondary", "allowSync": true, "nocache": true, "art": "/:/resources/movie-fanart.jpg", "identifier": "com.plexapp.plugins.library", "librarySectionID": "", "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, "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", "showOrdering": "dvd", "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", "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, "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", "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "1"}, {"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", "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "1"}, {"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", "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "1"}]}], "Genre": [{"tag": "Adventure"}, {"tag": "Adventure"}, {"tag": "Adventure"}], "Country": [{"tag": "United States of America"}, {"tag": "United States of America"}], "Director": [{"tag": "James Cameron"}, {"tag": "James Cameron"}], "Writer": [{"tag": "James Cameron"}], "Collection": [{"tag": "Working NL Subs"}], "Role": [{"tag": "Sigourney Weaver"}, {"tag": "Sigourney Weaver"}, {"tag": "Sigourney Weaver"}], "Guid": [{"id": "imdb://tt13015952"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}, {"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"}, {"ratingKey": "58683", "key": "/library/metadata/58683", "guid": "plex://movie/5d7768ba96b655001fdc0408", "studio": "20th Century Studios", "skipChildren": false, "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", "showOrdering": "dvd", "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", "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, "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", "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "1"}]}], "Genre": [], "Country": [{"tag": "United States of America"}], "Director": [{"tag": "James Cameron"}, {"tag": "James Cameron"}, {"tag": "James Cameron"}], "Writer": [{"tag": "James Cameron"}], "Collection": [{"tag": "Working NL Subs"}, {"tag": "Working NL Subs"}], "Role": [{"tag": "Sigourney Weaver"}, {"tag": "Sigourney Weaver"}, {"tag": "Sigourney Weaver"}], "Guid": [{"id": "imdb://tt13015952"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "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": [], "Sort": [], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}, {"key": "/library/sections/2/all?type=2", "type": "show", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}], "Sort": [], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}], "FieldType": [{"type": "tag", "Operator": [{"key": "=", "title": "is"}]}, {"type": "tag", "Operator": [{"key": "=", "title": "is"}, {"key": "=", "title": "is"}]}, {"type": "tag", "Operator": [{"key": "=", "title": "is"}, {"key": "=", "title": "is"}]}]}}} + application/json: {"MediaContainer": {"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"}, {"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"}, {"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"}, {"key": "=", "title": "is"}, {"key": "=", "title": "is"}]}, {"type": "tag", "Operator": [{"key": "=", "title": "is"}, {"key": "=", "title": "is"}]}, {"type": "tag", "Operator": [{"key": "=", "title": "is"}, {"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", "showOrdering": "dvd", "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}]}, {"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}, {"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}, {"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}]}, {"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"}, {"tag": "Adventure"}, {"tag": "Adventure"}], "Country": [{"tag": "United States of America"}, {"tag": "United States of America"}], "Director": [{"tag": "James Cameron"}, {"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"}, {"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}, {"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}], "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"}, {"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"}, {"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", "showOrdering": "dvd", "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": [], "Country": [{"tag": "United States of America"}], "Director": [{"tag": "James Cameron"}, {"tag": "James Cameron"}, {"tag": "James Cameron"}], "Writer": [{"tag": "James Cameron"}], "Collection": [{"tag": "Working NL Subs"}, {"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"}, {"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}, {"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}], "Guid": [{"id": "imdb://tt13015952"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Rating": [], "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": [], "Sort": [], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}, {"key": "/library/sections/2/all?type=2", "type": "show", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}], "Sort": [], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}], "FieldType": [{"type": "tag", "Operator": [{"key": "=", "title": "is"}]}, {"type": "tag", "Operator": [{"key": "=", "title": "is"}, {"key": "=", "title": "is"}]}, {"type": "tag", "Operator": [{"key": "=", "title": "is"}, {"key": "=", "title": "is"}]}]}}} "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": @@ -2381,6 +2494,23 @@ examples: application/json: {"errors": []} "400": application/json: {"errors": []} + "": + parameters: + query: + X-Plex-Client-Identifier: "gcgzw5rz2xovp84b4vha3a40" + X-Plex-Product: "Plex Web" + X-Plex-Device: "Linux" + X-Plex-Version: "4.133.0" + X-Plex-Platform: "Chrome" + requestBody: + application/x-www-form-urlencoded: {"login": "username@email.com", "password": "password123", "verificationCode": "123456"} + responses: + "201": + application/json: {"adsConsent": true, "adsConsentReminderAt": "2019-08-24T14:15:22Z", "adsConsentSetAt": "2019-08-24T14:15:22Z", "anonymous": false, "authToken": "CxoUzBTSV5hsxjTpFKaf", "backupCodesCreated": false, "confirmed": false, "country": "US", "email": "username@email.com", "emailOnlyAuth": false, "experimentalFeatures": false, "friendlyName": "friendlyUsername", "entitlements": [], "guest": false, "hasPassword": true, "home": false, "homeAdmin": false, "homeSize": 1, "id": 13692262, "joinedAt": 1721154902, "locale": null, "mailingListActive": false, "mailingListStatus": "unsubscribed", "maxHomeSize": 15, "pin": "string", "profile": {"autoSelectAudio": true, "defaultAudioLanguage": "ja", "defaultSubtitleLanguage": "en", "autoSelectSubtitle": 1, "defaultSubtitleAccessibility": 1, "defaultSubtitleForced": 1, "watchedIndicator": 1, "mediaReviewsVisibility": 1}, "protected": false, "rememberExpiresAt": 1722364046, "restricted": false, "roles": ["string"], "scrobbleTypes": "", "services": [{"identifier": "metadata-dev", "endpoint": "https://epg.provider.plex.tv", "token": "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", "secret": "string", "status": "online"}], "subscription": {"features": ["Android - Dolby Vision"], "active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive", "paymentService": "string", "plan": "string"}, "subscriptionDescription": "string", "subscriptions": [{"features": ["Android - Dolby Vision"], "active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive", "paymentService": "string", "plan": "string"}], "thumb": "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101", "title": "UsernameTitle", "twoFactorEnabled": false, "username": "Username", "uuid": "dae343c1f45beb4f", "attributionPartner": null, "pastSubscriptions": [{"id": "string", "mode": "string", "renewsAt": "string", "endsAt": "1556281940", "canceled": "0", "gracePeriod": "0", "onHold": "0", "canReactivate": "0", "canUpgrade": "0", "canDowngrade": "0", "canConvert": "0", "type": "plexpass", "transfer": "string", "state": "ended", "billing": {"paymentMethodId": 481656}}], "trials": [{}]} + "400": + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + "401": + application/json: {"errors": []} getStatistics: "": parameters: @@ -2562,3 +2692,34 @@ examples: application/json: {"errors": []} "401": application/json: {"errors": []} + get-recently-added: + speakeasy-default-get-recently-added: + parameters: + query: + contentDirectoryID: 470161 + sectionID: 2 + type: 2 + includeMeta: 1 + X-Plex-Container-Start: 0 + X-Plex-Container-Size: 50 + responses: + "200": + application/json: {"MediaContainer": {"size": 50, "identifier": "com.plexapp.plugins.library", "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"}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}, {"key": "/library/sections/2/all?type=2", "type": "show", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}, {"key": "/library/sections/2/all?type=2", "type": "show", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}], "FieldType": [{"type": "tag", "Operator": [{"key": "=", "title": "is"}]}, {"type": "tag", "Operator": []}, {"type": "tag", "Operator": []}]}, "Metadata": [{"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", "showOrdering": "dvd", "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}]}, {"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": []}]}], "Genre": [{"tag": "Adventure"}], "Country": [], "Director": [{"tag": "James Cameron"}, {"tag": "James Cameron"}], "Writer": [], "Collection": [], "Role": [{"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}, {"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}, {"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}], "Guid": [{"id": "imdb://tt13015952"}, {"id": "imdb://tt13015952"}, {"id": "imdb://tt13015952"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Rating": [], "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}, {"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}, {"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "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"}]}} + get-recently-added-library: + speakeasy-default-get-recently-added-library: + parameters: + query: + contentDirectoryID: 2 + pinnedContentDirectoryID: [3, 5, 7, 13, 12, 1, 6, 14, 2, 10, 16, 17] + sectionID: 2 + type: 2 + includeMeta: 1 + X-Plex-Container-Start: 0 + X-Plex-Container-Size: 50 + responses: + "200": + application/json: {"MediaContainer": {"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"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}, {"key": "/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"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}], "FieldType": [], "size": 50, "identifier": "com.plexapp.plugins.library", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1680021154, "Metadata": [{"librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionUUID": "322a231a-b7f7-49f5-920f-14c61199cd30", "ratingKey": 59398, "key": "/library/metadata/59398", "guid": "plex://movie/5e161a83bea6ac004126e148", "studio": "Marvel Studios", "type": "movie", "title": "Ant-Man and the Wasp: Quantumania", "contentRating": "PG-13", "summary": "Scott Lang and Hope Van Dyne along with Hank Pym and Janet Van Dyne explore the Quantum Realm where they interact with strange creatures and embark on an adventure that goes beyond the limits of what they thought was possible.", "rating": 4.7, "audienceRating": 8.3, "year": 2023, "tagline": "Witness the beginning of a new dynasty.", "thumb": "/library/metadata/59398/thumb/1681888010", "art": "/library/metadata/59398/art/1681888010", "duration": 7474422, "originallyAvailableAt": "2023-02-15T00:00:00Z", "addedAt": 1681803215, "updatedAt": 1681888010, "audienceRatingImage": "rottentomatoes://image.rating.upright", "chapterSource": "media", "primaryExtraKey": "/library/metadata/59399", "ratingImage": "rottentomatoes://image.rating.rotten", "Media": [{"id": 120345, "duration": 7474422, "bitrate": 3623, "width": 1920, "height": 804, "aspectRatio": 2.35, "audioChannels": 6, "audioCodec": "ac3", "videoCodec": "h264", "videoResolution": 1080, "container": "mp4", "videoFrameRate": "24p", "optimizedForStreaming": 0, "videoProfile": "high", "Part": []}], "Genre": [], "Director": [{"tag": "Peyton Reed"}], "Writer": [], "Country": [], "Role": [{"tag": "Paul Rudd"}, {"tag": "Paul Rudd"}, {"tag": "Paul Rudd"}]}]}} + "400": + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + "401": + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index ca64f552..e2d5082d 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: true java: - version: 0.4.1 + version: 0.5.0 additionalDependencies: [] additionalPlugins: [] artifactID: plexapi diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 4f35e800..7cd94c58 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.401.2 +speakeasyVersion: 1.402.14 sources: my-source: sourceNamespace: my-source @@ -8,8 +8,8 @@ sources: - latest plexapi: sourceNamespace: plexapi - sourceRevisionDigest: sha256:fc6eebe661455e23b1aa352a91c14ef773fa72331330ec4caeddc2c460dc16bb - sourceBlobDigest: sha256:2e81e86c83d7f4e8842efca0d43a2db84a4932534c8439e3737e1f65c873f855 + sourceRevisionDigest: sha256:b7081644a59eca24a22b8009506fcf459bf18b07dce0462b39bc36c40d94862e + sourceBlobDigest: sha256:6b822f23afbc630bbc0fc12299316ea03d3671a2c2a81241ad4caa49022b430e tags: - latest - main @@ -17,10 +17,10 @@ targets: plexjava: source: plexapi sourceNamespace: plexapi - sourceRevisionDigest: sha256:fc6eebe661455e23b1aa352a91c14ef773fa72331330ec4caeddc2c460dc16bb - sourceBlobDigest: sha256:2e81e86c83d7f4e8842efca0d43a2db84a4932534c8439e3737e1f65c873f855 + sourceRevisionDigest: sha256:b7081644a59eca24a22b8009506fcf459bf18b07dce0462b39bc36c40d94862e + sourceBlobDigest: sha256:6b822f23afbc630bbc0fc12299316ea03d3671a2c2a81241ad4caa49022b430e codeSamplesNamespace: code-samples-java-plexjava - codeSamplesRevisionDigest: sha256:0206006395b8e85b824f653a9a582e1949fe4f57636a54ea65105c11c0cc0018 + codeSamplesRevisionDigest: sha256:2b2011bee7f3ca4e29ec8c4fad1295a7c10ae37f6f6da7034d7aa919591f58ca workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index e74aca60..77f6281d 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'dev.plexapi:plexapi:0.4.1' +implementation 'dev.plexapi:plexapi:0.5.0' ``` Maven: @@ -45,7 +45,7 @@ Maven: dev.plexapi plexapi - 0.4.1 + 0.5.0 ``` @@ -131,12 +131,13 @@ public class Application { ### [hubs()](docs/sdks/hubs/README.md) * [getGlobalHubs](docs/sdks/hubs/README.md#getglobalhubs) - Get Global Hubs +* [getRecentlyAdded](docs/sdks/hubs/README.md#getrecentlyadded) - Get Recently Added * [getLibraryHubs](docs/sdks/hubs/README.md#getlibraryhubs) - Get library specific hubs ### [library()](docs/sdks/library/README.md) * [getFileHash](docs/sdks/library/README.md#getfilehash) - Get Hash Value -* [getRecentlyAdded](docs/sdks/library/README.md#getrecentlyadded) - Get Recently Added +* [getRecentlyAddedLibrary](docs/sdks/library/README.md#getrecentlyaddedlibrary) - Get Recently Added * [getAllLibraries](docs/sdks/library/README.md#getalllibraries) - Get All Libraries * [getLibraryDetails](docs/sdks/library/README.md#getlibrarydetails) - Get Library Details * [deleteLibrary](docs/sdks/library/README.md#deletelibrary) - Delete Library Section diff --git a/RELEASES.md b/RELEASES.md index 310dedb6..092a3368 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -88,4 +88,14 @@ Based on: ### Generated - [java v0.4.1] . ### Releases -- [Maven Central v0.4.1] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.4.1 - . \ No newline at end of file +- [Maven Central v0.4.1] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.4.1 - . + +## 2024-09-26 00:25:07 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.402.14 (2.422.22) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v0.5.0] . +### Releases +- [Maven Central v0.5.0] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.5.0 - . \ No newline at end of file diff --git a/build.gradle b/build.gradle index 5610d67c..d80b74ee 100644 --- a/build.gradle +++ b/build.gradle @@ -63,7 +63,7 @@ tasks.withType(Javadoc) { } group = "dev.plexapi" -version = "0.4.1" +version = "0.5.0" sourcesJar { archiveBaseName = "plexapi" @@ -101,7 +101,7 @@ publishing { maven(MavenPublication) { groupId = 'dev.plexapi' artifactId = 'plexapi' - version = '0.4.1' + version = '0.5.0' from components.java diff --git a/codeSamples.yaml b/codeSamples.yaml index 2f6f6b29..6b5bcfc0 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -708,6 +708,52 @@ actions: .onlyTransient(OnlyTransient.ONE) .call(); + if (res.object().isPresent()) { + // handle response + } + } + } + - target: $["paths"]["/hubs/home/recentlyAdded"]["get"] + update: + x-codeSamples: + - lang: java + label: added + source: |- + package hello.world; + + import dev.plexapi.plexapi.PlexAPI; + import dev.plexapi.plexapi.models.operations.GetRecentlyAddedRequest; + import dev.plexapi.plexapi.models.operations.GetRecentlyAddedResponse; + import dev.plexapi.plexapi.models.operations.IncludeMeta; + import dev.plexapi.plexapi.models.operations.Type; + import java.lang.Exception; + + public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accessToken("") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") + .build(); + + GetRecentlyAddedRequest req = GetRecentlyAddedRequest.builder() + .contentDirectoryID(470161L) + .type(Type.TvShow) + .sectionID(2L) + .includeMeta(IncludeMeta.Enable) + .xPlexContainerStart(0) + .xPlexContainerSize(50) + .build(); + + GetRecentlyAddedResponse res = sdk.hubs().getRecentlyAdded() + .request(req) + .call(); + if (res.object().isPresent()) { // handle response } @@ -742,7 +788,7 @@ actions: PerformSearchResponse res = sdk.search().performSearch() .query("dylan") - .sectionId(5838.67d) + .sectionId(9372.69d) .limit(5d) .call(); @@ -1134,19 +1180,23 @@ actions: update: x-codeSamples: - lang: java - label: getRecentlyAdded + label: library source: |- package hello.world; import dev.plexapi.plexapi.PlexAPI; - import dev.plexapi.plexapi.models.errors.GetRecentlyAddedBadRequest; - import dev.plexapi.plexapi.models.errors.GetRecentlyAddedUnauthorized; - import dev.plexapi.plexapi.models.operations.GetRecentlyAddedResponse; + import dev.plexapi.plexapi.models.errors.GetRecentlyAddedLibraryBadRequest; + import dev.plexapi.plexapi.models.errors.GetRecentlyAddedLibraryUnauthorized; + import dev.plexapi.plexapi.models.operations.GetRecentlyAddedLibraryRequest; + import dev.plexapi.plexapi.models.operations.GetRecentlyAddedLibraryResponse; + import dev.plexapi.plexapi.models.operations.QueryParamIncludeMeta; + import dev.plexapi.plexapi.models.operations.QueryParamType; import java.lang.Exception; + import java.util.List; public class Application { - public static void main(String[] args) throws GetRecentlyAddedBadRequest, GetRecentlyAddedUnauthorized, Exception { + public static void main(String[] args) throws GetRecentlyAddedLibraryBadRequest, GetRecentlyAddedLibraryUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") @@ -1157,9 +1207,30 @@ actions: .deviceName("Linux") .build(); - GetRecentlyAddedResponse res = sdk.library().getRecentlyAdded() + GetRecentlyAddedLibraryRequest req = GetRecentlyAddedLibraryRequest.builder() + .type(QueryParamType.TvShow) + .contentDirectoryID(2L) + .pinnedContentDirectoryID(List.of( + 3L, + 5L, + 7L, + 13L, + 12L, + 1L, + 6L, + 14L, + 2L, + 10L, + 16L, + 17L)) + .sectionID(2L) + .includeMeta(QueryParamIncludeMeta.Enable) .xPlexContainerStart(0) .xPlexContainerSize(50) + .build(); + + GetRecentlyAddedLibraryResponse res = sdk.library().getRecentlyAddedLibrary() + .request(req) .call(); if (res.object().isPresent()) { @@ -1366,8 +1437,8 @@ actions: import dev.plexapi.plexapi.PlexAPI; import dev.plexapi.plexapi.models.errors.GetSearchLibraryBadRequest; import dev.plexapi.plexapi.models.errors.GetSearchLibraryUnauthorized; + import dev.plexapi.plexapi.models.operations.GetSearchLibraryQueryParamType; import dev.plexapi.plexapi.models.operations.GetSearchLibraryResponse; - import dev.plexapi.plexapi.models.operations.QueryParamType; import java.lang.Exception; public class Application { @@ -1385,7 +1456,7 @@ actions: GetSearchLibraryResponse res = sdk.library().getSearchLibrary() .sectionKey(9518) - .type(QueryParamType.TvShow) + .type(GetSearchLibraryQueryParamType.TvShow) .call(); if (res.object().isPresent()) { @@ -1404,12 +1475,12 @@ actions: import dev.plexapi.plexapi.PlexAPI; import dev.plexapi.plexapi.models.errors.GetLibraryItemsBadRequest; import dev.plexapi.plexapi.models.errors.GetLibraryItemsUnauthorized; + import dev.plexapi.plexapi.models.operations.GetLibraryItemsQueryParamIncludeMeta; + import dev.plexapi.plexapi.models.operations.GetLibraryItemsQueryParamType; import dev.plexapi.plexapi.models.operations.GetLibraryItemsRequest; import dev.plexapi.plexapi.models.operations.GetLibraryItemsResponse; import dev.plexapi.plexapi.models.operations.IncludeGuids; - import dev.plexapi.plexapi.models.operations.IncludeMeta; import dev.plexapi.plexapi.models.operations.Tag; - import dev.plexapi.plexapi.models.operations.Type; import java.lang.Exception; public class Application { @@ -1429,8 +1500,8 @@ actions: .sectionKey(9518) .tag(Tag.EDITION) .includeGuids(IncludeGuids.Enable) - .includeMeta(IncludeMeta.Enable) - .type(Type.TvShow) + .type(GetLibraryItemsQueryParamType.TvShow) + .includeMeta(GetLibraryItemsQueryParamIncludeMeta.Enable) .xPlexContainerStart(0) .xPlexContainerSize(50) .build(); @@ -1657,8 +1728,8 @@ actions: .width(110d) .height(165d) .opacity(100L) - .blur(0d) - .minSize(MinSize.ONE) + .blur(20d) + .minSize(MinSize.ZERO) .upscale(Upscale.ONE) .url("/library/metadata/49564/thumb/1654258204") .build(); @@ -2186,7 +2257,7 @@ actions: .build(); GetSourceConnectionInformationResponse res = sdk.authentication().getSourceConnectionInformation() - .source("provider://provider-identifier") + .source("server://client-identifier") .call(); // handle response @@ -2670,6 +2741,7 @@ actions: import dev.plexapi.plexapi.PlexAPI; import dev.plexapi.plexapi.models.errors.PostUsersSignInDataBadRequest; import dev.plexapi.plexapi.models.errors.PostUsersSignInDataUnauthorized; + import dev.plexapi.plexapi.models.operations.PostUsersSignInDataRequest; import dev.plexapi.plexapi.models.operations.PostUsersSignInDataRequestBody; import dev.plexapi.plexapi.models.operations.PostUsersSignInDataResponse; import java.lang.Exception; @@ -2686,10 +2758,12 @@ actions: .deviceName("Linux") .build(); - PostUsersSignInDataRequestBody req = PostUsersSignInDataRequestBody.builder() - .login("username@email.com") - .password("password123") - .verificationCode("123456") + PostUsersSignInDataRequest req = PostUsersSignInDataRequest.builder() + .requestBody(PostUsersSignInDataRequestBody.builder() + .login("username@email.com") + .password("password123") + .verificationCode("123456") + .build()) .build(); PostUsersSignInDataResponse res = sdk.authentication().postUsersSignInData() diff --git a/docs/models/errors/GetRecentlyAddedErrors.md b/docs/models/errors/GetRecentlyAddedErrors.md deleted file mode 100644 index 29842296..00000000 --- a/docs/models/errors/GetRecentlyAddedErrors.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetRecentlyAddedErrors - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetRecentlyAddedUnauthorized.md b/docs/models/errors/GetRecentlyAddedLibraryBadRequest.md similarity index 94% rename from docs/models/errors/GetRecentlyAddedUnauthorized.md rename to docs/models/errors/GetRecentlyAddedLibraryBadRequest.md index edac8d9b..45b83d62 100644 --- a/docs/models/errors/GetRecentlyAddedUnauthorized.md +++ b/docs/models/errors/GetRecentlyAddedLibraryBadRequest.md @@ -1,6 +1,6 @@ -# GetRecentlyAddedUnauthorized +# GetRecentlyAddedLibraryBadRequest -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +Bad Request - A parameter was not specified, or was specified incorrectly. ## Fields diff --git a/docs/models/errors/GetRecentlyAddedLibraryErrors.md b/docs/models/errors/GetRecentlyAddedLibraryErrors.md index 08ffbaef..47176aa2 100644 --- a/docs/models/errors/GetRecentlyAddedLibraryErrors.md +++ b/docs/models/errors/GetRecentlyAddedLibraryErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | -| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | -| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/models/errors/GetRecentlyAddedLibraryLibraryErrors.md b/docs/models/errors/GetRecentlyAddedLibraryLibraryErrors.md new file mode 100644 index 00000000..026144d2 --- /dev/null +++ b/docs/models/errors/GetRecentlyAddedLibraryLibraryErrors.md @@ -0,0 +1,10 @@ +# GetRecentlyAddedLibraryLibraryErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *Optional* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *Optional* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *Optional* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/models/errors/GetRecentlyAddedBadRequest.md b/docs/models/errors/GetRecentlyAddedLibraryUnauthorized.md similarity index 88% rename from docs/models/errors/GetRecentlyAddedBadRequest.md rename to docs/models/errors/GetRecentlyAddedLibraryUnauthorized.md index 9ad85a1b..b5b46f36 100644 --- a/docs/models/errors/GetRecentlyAddedBadRequest.md +++ b/docs/models/errors/GetRecentlyAddedLibraryUnauthorized.md @@ -1,11 +1,11 @@ -# GetRecentlyAddedBadRequest +# GetRecentlyAddedLibraryUnauthorized -Bad Request - A parameter was not specified, or was specified incorrectly. +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Fields | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `errors` | List<[GetRecentlyAddedErrors](../../models/errors/GetRecentlyAddedErrors.md)> | :heavy_minus_sign: | N/A | +| `errors` | List<[GetRecentlyAddedLibraryLibraryErrors](../../models/errors/GetRecentlyAddedLibraryLibraryErrors.md)> | :heavy_minus_sign: | N/A | | `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/Director.md b/docs/models/operations/Director.md index 379feff0..321e7bb5 100644 --- a/docs/models/operations/Director.md +++ b/docs/models/operations/Director.md @@ -5,4 +5,4 @@ | Field | Type | Required | Description | Example | | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `tag` | *Optional* | :heavy_minus_sign: | N/A | Peyton Reed | \ No newline at end of file +| `tag` | *Optional* | :heavy_minus_sign: | N/A | James Cameron | \ No newline at end of file diff --git a/docs/models/operations/Field.md b/docs/models/operations/Field.md index 2cdcce54..aead0bc7 100644 --- a/docs/models/operations/Field.md +++ b/docs/models/operations/Field.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `key` | *Optional* | :heavy_minus_sign: | N/A | label | -| `title` | *Optional* | :heavy_minus_sign: | N/A | Label | -| `type` | *Optional* | :heavy_minus_sign: | N/A | tag | -| `subType` | *Optional* | :heavy_minus_sign: | N/A | bitrate | \ No newline at end of file +| `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/FieldType.md b/docs/models/operations/FieldType.md index 5a135e54..65c42259 100644 --- a/docs/models/operations/FieldType.md +++ b/docs/models/operations/FieldType.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `type` | *Optional* | :heavy_minus_sign: | N/A | resolution | -| `operator` | List<[Operator](../../models/operations/Operator.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `type` | *String* | :heavy_check_mark: | N/A | tag | +| `operator` | List<[Operator](../../models/operations/Operator.md)> | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/Genre.md b/docs/models/operations/Genre.md index 35a3e3a4..6e0eb6fb 100644 --- a/docs/models/operations/Genre.md +++ b/docs/models/operations/Genre.md @@ -5,4 +5,4 @@ | Field | Type | Required | Description | Example | | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `tag` | *Optional* | :heavy_minus_sign: | N/A | Comedy | \ No newline at end of file +| `tag` | *Optional* | :heavy_minus_sign: | N/A | Adventure | \ No newline at end of file diff --git a/docs/models/operations/GetAllLibrariesDirectory.md b/docs/models/operations/GetAllLibrariesDirectory.md index 13624d46..d2d6b3ca 100644 --- a/docs/models/operations/GetAllLibrariesDirectory.md +++ b/docs/models/operations/GetAllLibrariesDirectory.md @@ -23,6 +23,6 @@ | `scannedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | | `content` | *boolean* | :heavy_check_mark: | N/A | true | | `directory` | *boolean* | :heavy_check_mark: | N/A | true | -| `contentChangedAt` | *int* | :heavy_check_mark: | N/A | 3192854 | +| `contentChangedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | | `hidden` | *int* | :heavy_check_mark: | N/A | 0 | | `location` | List<[Location](../../models/operations/Location.md)> | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryDetailsField.md b/docs/models/operations/GetLibraryDetailsField.md new file mode 100644 index 00000000..21ce7163 --- /dev/null +++ b/docs/models/operations/GetLibraryDetailsField.md @@ -0,0 +1,11 @@ +# GetLibraryDetailsField + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `key` | *Optional* | :heavy_minus_sign: | N/A | label | +| `title` | *Optional* | :heavy_minus_sign: | N/A | Label | +| `type` | *Optional* | :heavy_minus_sign: | N/A | tag | +| `subType` | *Optional* | :heavy_minus_sign: | N/A | bitrate | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryDetailsFieldType.md b/docs/models/operations/GetLibraryDetailsFieldType.md new file mode 100644 index 00000000..87d8416b --- /dev/null +++ b/docs/models/operations/GetLibraryDetailsFieldType.md @@ -0,0 +1,9 @@ +# GetLibraryDetailsFieldType + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `type` | *Optional* | :heavy_minus_sign: | N/A | resolution | +| `operator` | List<[GetLibraryDetailsOperator](../../models/operations/GetLibraryDetailsOperator.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryDetailsMediaContainer.md b/docs/models/operations/GetLibraryDetailsMediaContainer.md index d9d684e4..b710c8bf 100644 --- a/docs/models/operations/GetLibraryDetailsMediaContainer.md +++ b/docs/models/operations/GetLibraryDetailsMediaContainer.md @@ -19,4 +19,4 @@ | `viewMode` | *Optional* | :heavy_minus_sign: | N/A | 65592 | | `directory` | List<[GetLibraryDetailsDirectory](../../models/operations/GetLibraryDetailsDirectory.md)> | :heavy_minus_sign: | N/A | | | `type` | List<[GetLibraryDetailsType](../../models/operations/GetLibraryDetailsType.md)> | :heavy_minus_sign: | N/A | | -| `fieldType` | List<[FieldType](../../models/operations/FieldType.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `fieldType` | List<[GetLibraryDetailsFieldType](../../models/operations/GetLibraryDetailsFieldType.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryDetailsOperator.md b/docs/models/operations/GetLibraryDetailsOperator.md new file mode 100644 index 00000000..3b78d7e3 --- /dev/null +++ b/docs/models/operations/GetLibraryDetailsOperator.md @@ -0,0 +1,9 @@ +# GetLibraryDetailsOperator + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `key` | *Optional* | :heavy_minus_sign: | N/A | = | +| `title` | *Optional* | :heavy_minus_sign: | N/A | is | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryDetailsSort.md b/docs/models/operations/GetLibraryDetailsSort.md new file mode 100644 index 00000000..2bf5c862 --- /dev/null +++ b/docs/models/operations/GetLibraryDetailsSort.md @@ -0,0 +1,13 @@ +# GetLibraryDetailsSort + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `default_` | *Optional* | :heavy_minus_sign: | N/A | asc | +| `defaultDirection` | *Optional* | :heavy_minus_sign: | N/A | desc | +| `descKey` | *Optional* | :heavy_minus_sign: | N/A | random:desc | +| `firstCharacterKey` | *Optional* | :heavy_minus_sign: | N/A | /library/sections/1/firstCharacter | +| `key` | *Optional* | :heavy_minus_sign: | N/A | random | +| `title` | *Optional* | :heavy_minus_sign: | N/A | Randomly | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryDetailsType.md b/docs/models/operations/GetLibraryDetailsType.md index 0699c9f2..8c7a5432 100644 --- a/docs/models/operations/GetLibraryDetailsType.md +++ b/docs/models/operations/GetLibraryDetailsType.md @@ -10,5 +10,5 @@ | `title` | *Optional* | :heavy_minus_sign: | N/A | Movies | | `active` | *Optional* | :heavy_minus_sign: | N/A | false | | `filter` | List<[GetLibraryDetailsFilter](../../models/operations/GetLibraryDetailsFilter.md)> | :heavy_minus_sign: | N/A | | -| `sort` | List<[Sort](../../models/operations/Sort.md)> | :heavy_minus_sign: | N/A | | -| `field` | List<[Field](../../models/operations/Field.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `sort` | List<[GetLibraryDetailsSort](../../models/operations/GetLibraryDetailsSort.md)> | :heavy_minus_sign: | N/A | | +| `field` | List<[GetLibraryDetailsField](../../models/operations/GetLibraryDetailsField.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsActiveDirection.md b/docs/models/operations/GetLibraryItemsActiveDirection.md new file mode 100644 index 00000000..308a0170 --- /dev/null +++ b/docs/models/operations/GetLibraryItemsActiveDirection.md @@ -0,0 +1,12 @@ +# GetLibraryItemsActiveDirection + +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/GetLibraryItemsCollection.md b/docs/models/operations/GetLibraryItemsCollection.md new file mode 100644 index 00000000..0ce89d7f --- /dev/null +++ b/docs/models/operations/GetLibraryItemsCollection.md @@ -0,0 +1,8 @@ +# GetLibraryItemsCollection + + +## 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/GetLibraryItemsDefaultDirection.md b/docs/models/operations/GetLibraryItemsDefaultDirection.md new file mode 100644 index 00000000..e9cec297 --- /dev/null +++ b/docs/models/operations/GetLibraryItemsDefaultDirection.md @@ -0,0 +1,12 @@ +# GetLibraryItemsDefaultDirection + +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/GetLibraryItemsFlattenSeasons.md b/docs/models/operations/GetLibraryItemsFlattenSeasons.md new file mode 100644 index 00000000..d1ce12ff --- /dev/null +++ b/docs/models/operations/GetLibraryItemsFlattenSeasons.md @@ -0,0 +1,9 @@ +# GetLibraryItemsFlattenSeasons + + +## Values + +| Name | Value | +| ------- | ------- | +| `False` | 0 | +| `True` | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsHasThumbnail.md b/docs/models/operations/GetLibraryItemsHasThumbnail.md new file mode 100644 index 00000000..ae283db5 --- /dev/null +++ b/docs/models/operations/GetLibraryItemsHasThumbnail.md @@ -0,0 +1,9 @@ +# GetLibraryItemsHasThumbnail + + +## Values + +| Name | Value | +| ------- | ------- | +| `False` | 0 | +| `True` | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsImage.md b/docs/models/operations/GetLibraryItemsImage.md index 928613fa..1628d497 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` | [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 +| 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 diff --git a/docs/models/operations/GetLibraryItemsLibraryActiveDirection.md b/docs/models/operations/GetLibraryItemsLibraryActiveDirection.md new file mode 100644 index 00000000..82af1574 --- /dev/null +++ b/docs/models/operations/GetLibraryItemsLibraryActiveDirection.md @@ -0,0 +1,12 @@ +# 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 new file mode 100644 index 00000000..d2535c6c --- /dev/null +++ b/docs/models/operations/GetLibraryItemsLibraryDefaultDirection.md @@ -0,0 +1,12 @@ +# 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 new file mode 100644 index 00000000..e64cba06 --- /dev/null +++ b/docs/models/operations/GetLibraryItemsLibraryField.md @@ -0,0 +1,11 @@ +# 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 new file mode 100644 index 00000000..7eb53982 --- /dev/null +++ b/docs/models/operations/GetLibraryItemsLibraryFieldType.md @@ -0,0 +1,9 @@ +# 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 new file mode 100644 index 00000000..c5eddc05 --- /dev/null +++ b/docs/models/operations/GetLibraryItemsLibraryFilter.md @@ -0,0 +1,12 @@ +# 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 new file mode 100644 index 00000000..6772cc0f --- /dev/null +++ b/docs/models/operations/GetLibraryItemsLibraryOperator.md @@ -0,0 +1,9 @@ +# 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/GetLibraryItemsLibraryResponse200Type.md b/docs/models/operations/GetLibraryItemsLibraryResponse200Type.md new file mode 100644 index 00000000..b4e85e16 --- /dev/null +++ b/docs/models/operations/GetLibraryItemsLibraryResponse200Type.md @@ -0,0 +1,11 @@ +# 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 1573fa0c..5af467a7 100644 --- a/docs/models/operations/GetLibraryItemsLibraryResponseType.md +++ b/docs/models/operations/GetLibraryItemsLibraryResponseType.md @@ -1,11 +1,14 @@ # GetLibraryItemsLibraryResponseType -## Values +## Fields -| Name | Value | -| -------------- | -------------- | -| `COVER_POSTER` | coverPoster | -| `BACKGROUND` | background | -| `SNAPSHOT` | snapshot | -| `CLEAR_LOGO` | clearLogo | \ 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<[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 diff --git a/docs/models/operations/GetLibraryItemsLibrarySort.md b/docs/models/operations/GetLibraryItemsLibrarySort.md new file mode 100644 index 00000000..a5ea6c5f --- /dev/null +++ b/docs/models/operations/GetLibraryItemsLibrarySort.md @@ -0,0 +1,15 @@ +# 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 896bcfe2..8bb508db 100644 --- a/docs/models/operations/GetLibraryItemsLibraryType.md +++ b/docs/models/operations/GetLibraryItemsLibraryType.md @@ -1,14 +1,14 @@ # GetLibraryItemsLibraryType +The type of media content -## 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 | 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 + +## Values + +| Name | Value | +| --------- | --------- | +| `Movie` | movie | +| `TvShow` | show | +| `Season` | season | +| `Episode` | episode | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsMedia.md b/docs/models/operations/GetLibraryItemsMedia.md index 745bb358..42a7a679 100644 --- a/docs/models/operations/GetLibraryItemsMedia.md +++ b/docs/models/operations/GetLibraryItemsMedia.md @@ -3,21 +3,23 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `id` | *int* | :heavy_check_mark: | N/A | 119534 | -| `duration` | *int* | :heavy_check_mark: | N/A | 11558112 | -| `bitrate` | *int* | :heavy_check_mark: | N/A | 25025 | -| `width` | *int* | :heavy_check_mark: | N/A | 3840 | -| `height` | *int* | :heavy_check_mark: | N/A | 2072 | -| `aspectRatio` | *double* | :heavy_check_mark: | N/A | 1.85 | -| `audioProfile` | *Optional* | :heavy_minus_sign: | N/A | dts | -| `audioChannels` | *int* | :heavy_check_mark: | N/A | 6 | -| `audioCodec` | *String* | :heavy_check_mark: | N/A | eac3 | -| `videoCodec` | *String* | :heavy_check_mark: | N/A | hevc | -| `videoResolution` | *String* | :heavy_check_mark: | N/A | 4k | -| `container` | *String* | :heavy_check_mark: | N/A | mkv | -| `videoFrameRate` | *String* | :heavy_check_mark: | N/A | 24p | -| `videoProfile` | *String* | :heavy_check_mark: | N/A | main 10 | -| `hasVoiceActivity` | *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` | *int* | :heavy_check_mark: | N/A | 119534 | +| `duration` | *int* | :heavy_check_mark: | N/A | 11558112 | +| `bitrate` | *int* | :heavy_check_mark: | N/A | 25025 | +| `width` | *int* | :heavy_check_mark: | N/A | 3840 | +| `height` | *int* | :heavy_check_mark: | N/A | 2072 | +| `aspectRatio` | *double* | :heavy_check_mark: | N/A | 1.85 | +| `audioProfile` | *Optional* | :heavy_minus_sign: | N/A | dts | +| `audioChannels` | *int* | :heavy_check_mark: | N/A | 6 | +| `audioCodec` | *String* | :heavy_check_mark: | N/A | eac3 | +| `videoCodec` | *String* | :heavy_check_mark: | N/A | hevc | +| `videoResolution` | *String* | :heavy_check_mark: | N/A | 4k | +| `container` | *String* | :heavy_check_mark: | N/A | mkv | +| `videoFrameRate` | *String* | :heavy_check_mark: | N/A | 24p | +| `videoProfile` | *String* | :heavy_check_mark: | 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 diff --git a/docs/models/operations/GetLibraryItemsMediaContainer.md b/docs/models/operations/GetLibraryItemsMediaContainer.md index 0093cc0c..8bc8472f 100644 --- a/docs/models/operations/GetLibraryItemsMediaContainer.md +++ b/docs/models/operations/GetLibraryItemsMediaContainer.md @@ -1,10 +1,15 @@ # 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 | @@ -13,7 +18,7 @@ | `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` | [LibrarySectionID](../../models/operations/LibrarySectionID.md) | :heavy_check_mark: | N/A | | +| `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/ | @@ -25,4 +30,4 @@ | `viewMode` | *Optional* | :heavy_minus_sign: | N/A | 65592 | | `mixedParents` | *Optional* | :heavy_minus_sign: | N/A | true | | `metadata` | List<[GetLibraryItemsMetadata](../../models/operations/GetLibraryItemsMetadata.md)> | :heavy_check_mark: | N/A | | -| `meta` | [Optional](../../models/operations/Meta.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 +| `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/GetLibraryItemsMediaGuid.md b/docs/models/operations/GetLibraryItemsMediaGuid.md new file mode 100644 index 00000000..9095284d --- /dev/null +++ b/docs/models/operations/GetLibraryItemsMediaGuid.md @@ -0,0 +1,8 @@ +# GetLibraryItemsMediaGuid + + +## 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/GetLibraryItemsMeta.md b/docs/models/operations/GetLibraryItemsMeta.md new file mode 100644 index 00000000..0d591b43 --- /dev/null +++ b/docs/models/operations/GetLibraryItemsMeta.md @@ -0,0 +1,12 @@ +# GetLibraryItemsMeta + +The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. + + + +## 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 diff --git a/docs/models/operations/GetLibraryItemsMetaDataRating.md b/docs/models/operations/GetLibraryItemsMetaDataRating.md new file mode 100644 index 00000000..74528639 --- /dev/null +++ b/docs/models/operations/GetLibraryItemsMetaDataRating.md @@ -0,0 +1,10 @@ +# GetLibraryItemsMetaDataRating + + +## 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/GetLibraryItemsMetadata.md b/docs/models/operations/GetLibraryItemsMetadata.md index bd47fdfd..b28c4a03 100644 --- a/docs/models/operations/GetLibraryItemsMetadata.md +++ b/docs/models/operations/GetLibraryItemsMetadata.md @@ -10,7 +10,10 @@ | `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 | -| `type` | [GetLibraryItemsType](../../models/operations/GetLibraryItemsType.md) | :heavy_check_mark: | The type of media content
| movie | +| `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
| 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 | @@ -20,8 +23,8 @@ | `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: | N/A | 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)).
| dvd | +| `flattenSeasons` | [Optional](../../models/operations/GetLibraryItemsFlattenSeasons.md) | :heavy_minus_sign: | N/A | 1 | +| `showOrdering` | [Optional](../../models/operations/GetLibraryItemsShowOrdering.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)).
| dvd | | `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 | @@ -38,6 +41,7 @@ | `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 | @@ -46,10 +50,11 @@ | `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<[Collection](../../models/operations/Collection.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 | | -| `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/UltraBlurColors.md) | :heavy_minus_sign: | N/A | | +| `mediaGuid` | List<[GetLibraryItemsMediaGuid](../../models/operations/GetLibraryItemsMediaGuid.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<[GetLibraryItemsMetaDataRating](../../models/operations/GetLibraryItemsMetaDataRating.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 | diff --git a/docs/models/operations/GetLibraryItemsOptimizedForStreaming.md b/docs/models/operations/GetLibraryItemsOptimizedForStreaming.md new file mode 100644 index 00000000..8075b9e7 --- /dev/null +++ b/docs/models/operations/GetLibraryItemsOptimizedForStreaming.md @@ -0,0 +1,9 @@ +# GetLibraryItemsOptimizedForStreaming + + +## Values + +| Name | Value | +| --------- | --------- | +| `Disable` | 0 | +| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsPart.md b/docs/models/operations/GetLibraryItemsPart.md index dd739ee2..6bfc10b0 100644 --- a/docs/models/operations/GetLibraryItemsPart.md +++ b/docs/models/operations/GetLibraryItemsPart.md @@ -12,6 +12,9 @@ | `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` | *String* | :heavy_check_mark: | N/A | main 10 | | `indexes` | *Optional* | :heavy_minus_sign: | N/A | sd | -| `hasThumbnail` | [Optional](../../models/operations/HasThumbnail.md) | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file +| `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 diff --git a/docs/models/operations/GetLibraryItemsQueryParamIncludeMeta.md b/docs/models/operations/GetLibraryItemsQueryParamIncludeMeta.md new file mode 100644 index 00000000..d721bb9f --- /dev/null +++ b/docs/models/operations/GetLibraryItemsQueryParamIncludeMeta.md @@ -0,0 +1,12 @@ +# GetLibraryItemsQueryParamIncludeMeta + +Adds the Meta object to the response + + + +## Values + +| Name | Value | +| --------- | --------- | +| `Disable` | 0 | +| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsQueryParamType.md b/docs/models/operations/GetLibraryItemsQueryParamType.md new file mode 100644 index 00000000..8ab46c43 --- /dev/null +++ b/docs/models/operations/GetLibraryItemsQueryParamType.md @@ -0,0 +1,19 @@ +# GetLibraryItemsQueryParamType + +The type of media to retrieve. +1 = movie +2 = show +3 = season +4 = episode +E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + + + +## Values + +| Name | Value | +| --------- | --------- | +| `Movie` | 1 | +| `TvShow` | 2 | +| `Season` | 3 | +| `Episode` | 4 | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsRequest.md b/docs/models/operations/GetLibraryItemsRequest.md index 17509859..57274524 100644 --- a/docs/models/operations/GetLibraryItemsRequest.md +++ b/docs/models/operations/GetLibraryItemsRequest.md @@ -8,7 +8,7 @@ | `sectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | | `tag` | [Tag](../../models/operations/Tag.md) | :heavy_check_mark: | A key representing a specific tag within the section. | | | `includeGuids` | [Optional](../../models/operations/IncludeGuids.md) | :heavy_minus_sign: | Adds the Guids object to the response
| 1 | -| `includeMeta` | [Optional](../../models/operations/IncludeMeta.md) | :heavy_minus_sign: | Adds the Meta object to the response
| 1 | -| `type` | [Optional](../../models/operations/Type.md) | :heavy_minus_sign: | The type of media to retrieve.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | +| `type` | [Optional](../../models/operations/GetLibraryItemsQueryParamType.md) | :heavy_minus_sign: | The type of media to retrieve.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | +| `includeMeta` | [Optional](../../models/operations/GetLibraryItemsQueryParamIncludeMeta.md) | :heavy_minus_sign: | Adds the Meta object to the response
| 1 | | `xPlexContainerStart` | *Optional* | :heavy_minus_sign: | The index of the first item to return. If not specified, the first item will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 0
| 0 | | `xPlexContainerSize` | *Optional* | :heavy_minus_sign: | The number of items to return. If not specified, all items will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 50
| 50 | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsRole.md b/docs/models/operations/GetLibraryItemsRole.md index 3a00b53b..04a8bc61 100644 --- a/docs/models/operations/GetLibraryItemsRole.md +++ b/docs/models/operations/GetLibraryItemsRole.md @@ -3,6 +3,11 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `tag` | *Optional* | :heavy_minus_sign: | N/A | Sigourney Weaver | \ No newline at end of file +| 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 diff --git a/docs/models/operations/GetLibraryItemsShowOrdering.md b/docs/models/operations/GetLibraryItemsShowOrdering.md new file mode 100644 index 00000000..1d7aa8ce --- /dev/null +++ b/docs/models/operations/GetLibraryItemsShowOrdering.md @@ -0,0 +1,20 @@ +# GetLibraryItemsShowOrdering + +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)). + + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `None` | None | +| `TmdbAiring` | tmdbAiring | +| `Aired` | aired | +| `Dvd` | dvd | +| `Absolute` | absolute | \ No newline at end of file diff --git a/docs/models/operations/GetLibraryItemsSort.md b/docs/models/operations/GetLibraryItemsSort.md index 27d31c2a..b394248a 100644 --- a/docs/models/operations/GetLibraryItemsSort.md +++ b/docs/models/operations/GetLibraryItemsSort.md @@ -3,13 +3,13 @@ ## 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/ActiveDirection.md) | :heavy_minus_sign: | The direction of the sort. Can be either `asc` or `desc`.
| asc | -| `defaultDirection` | [Optional](../../models/operations/DefaultDirection.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 +| 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/GetLibraryItemsActiveDirection.md) | :heavy_minus_sign: | The direction of the sort. Can be either `asc` or `desc`.
| asc | +| `defaultDirection` | [Optional](../../models/operations/GetLibraryItemsDefaultDirection.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/GetLibraryItemsStream.md b/docs/models/operations/GetLibraryItemsStream.md new file mode 100644 index 00000000..6b726314 --- /dev/null +++ b/docs/models/operations/GetLibraryItemsStream.md @@ -0,0 +1,45 @@ +# 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 1888dbf2..32b2bf40 100644 --- a/docs/models/operations/GetLibraryItemsType.md +++ b/docs/models/operations/GetLibraryItemsType.md @@ -1,14 +1,14 @@ # GetLibraryItemsType -The type of media content +## Fields - -## Values - -| Name | Value | -| --------- | --------- | -| `Movie` | movie | -| `TvShow` | show | -| `Season` | season | -| `Episode` | episode | \ 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/GetLibraryItemsUltraBlurColors.md b/docs/models/operations/GetLibraryItemsUltraBlurColors.md new file mode 100644 index 00000000..1e2c27d0 --- /dev/null +++ b/docs/models/operations/GetLibraryItemsUltraBlurColors.md @@ -0,0 +1,11 @@ +# GetLibraryItemsUltraBlurColors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `topLeft` | *String* | :heavy_check_mark: | N/A | 11333b | +| `topRight` | *String* | :heavy_check_mark: | N/A | 0a232d | +| `bottomRight` | *String* | :heavy_check_mark: | N/A | 73958 | +| `bottomLeft` | *String* | :heavy_check_mark: | N/A | 1f5066 | \ No newline at end of file diff --git a/docs/models/operations/GetMetaDataByRatingKeyPart.md b/docs/models/operations/GetMetaDataByRatingKeyPart.md index c1eb45df..a83d9b12 100644 --- a/docs/models/operations/GetMetaDataByRatingKeyPart.md +++ b/docs/models/operations/GetMetaDataByRatingKeyPart.md @@ -3,16 +3,16 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `id` | *Optional* | :heavy_minus_sign: | N/A | 15 | -| `key` | *Optional* | :heavy_minus_sign: | N/A | /library/parts/15/1705637151/file.mp4 | -| `duration` | *Optional* | :heavy_minus_sign: | N/A | 141417 | -| `file` | *Optional* | :heavy_minus_sign: | N/A | /movies/Serenity (2005)/Serenity (2005).mp4 | -| `size` | *Optional* | :heavy_minus_sign: | N/A | 40271948 | -| `audioProfile` | *Optional* | :heavy_minus_sign: | N/A | lc | -| `container` | *Optional* | :heavy_minus_sign: | N/A | mp4 | -| `has64bitOffsets` | *Optional* | :heavy_minus_sign: | N/A | false | -| `optimizedForStreaming` | *Optional* | :heavy_minus_sign: | N/A | false | -| `videoProfile` | *Optional* | :heavy_minus_sign: | N/A | high | -| `stream` | List<[Stream](../../models/operations/Stream.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 15 | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /library/parts/15/1705637151/file.mp4 | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 141417 | +| `file` | *Optional* | :heavy_minus_sign: | N/A | /movies/Serenity (2005)/Serenity (2005).mp4 | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 40271948 | +| `audioProfile` | *Optional* | :heavy_minus_sign: | N/A | lc | +| `container` | *Optional* | :heavy_minus_sign: | N/A | mp4 | +| `has64bitOffsets` | *Optional* | :heavy_minus_sign: | N/A | false | +| `optimizedForStreaming` | *Optional* | :heavy_minus_sign: | N/A | false | +| `videoProfile` | *Optional* | :heavy_minus_sign: | N/A | high | +| `stream` | List<[GetMetaDataByRatingKeyStream](../../models/operations/GetMetaDataByRatingKeyStream.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetMetaDataByRatingKeyStream.md b/docs/models/operations/GetMetaDataByRatingKeyStream.md new file mode 100644 index 00000000..6f7bd28a --- /dev/null +++ b/docs/models/operations/GetMetaDataByRatingKeyStream.md @@ -0,0 +1,39 @@ +# GetMetaDataByRatingKeyStream + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 29 | +| `streamType` | *Optional* | :heavy_minus_sign: | N/A | 2 | +| `default_` | *Optional* | :heavy_minus_sign: | N/A | true | +| `codec` | *Optional* | :heavy_minus_sign: | N/A | aac | +| `index` | *Optional* | :heavy_minus_sign: | N/A | 0 | +| `bitrate` | *Optional* | :heavy_minus_sign: | N/A | 128 | +| `bitDepth` | *Optional* | :heavy_minus_sign: | N/A | 8 | +| `chromaLocation` | *Optional* | :heavy_minus_sign: | N/A | left | +| `chromaSubsampling` | *Optional* | :heavy_minus_sign: | N/A | 14520 | +| `codedHeight` | *Optional* | :heavy_minus_sign: | N/A | 816 | +| `codedWidth` | *Optional* | :heavy_minus_sign: | N/A | 1920 | +| `colorPrimaries` | *Optional* | :heavy_minus_sign: | N/A | bt709 | +| `colorRange` | *Optional* | :heavy_minus_sign: | N/A | tv | +| `colorSpace` | *Optional* | :heavy_minus_sign: | N/A | bt709 | +| `colorTrc` | *Optional* | :heavy_minus_sign: | N/A | bt709 | +| `frameRate` | *Optional* | :heavy_minus_sign: | N/A | 24 | +| `hasScalingMatrix` | *Optional* | :heavy_minus_sign: | N/A | false | +| `height` | *Optional* | :heavy_minus_sign: | N/A | 814 | +| `level` | *Optional* | :heavy_minus_sign: | N/A | 40 | +| `profile` | *Optional* | :heavy_minus_sign: | N/A | lc | +| `refFrames` | *Optional* | :heavy_minus_sign: | N/A | 4 | +| `scanType` | *Optional* | :heavy_minus_sign: | N/A | progressive | +| `streamIdentifier` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `width` | *Optional* | :heavy_minus_sign: | N/A | 1920 | +| `displayTitle` | *Optional* | :heavy_minus_sign: | N/A | English (AAC Stereo) | +| `extendedDisplayTitle` | *Optional* | :heavy_minus_sign: | N/A | English (AAC Stereo) | +| `selected` | *Optional* | :heavy_minus_sign: | N/A | true | +| `channels` | *Optional* | :heavy_minus_sign: | N/A | 2 | +| `language` | *Optional* | :heavy_minus_sign: | N/A | English | +| `languageTag` | *Optional* | :heavy_minus_sign: | N/A | en | +| `languageCode` | *Optional* | :heavy_minus_sign: | N/A | eng | +| `samplingRate` | *Optional* | :heavy_minus_sign: | N/A | 44100 | \ No newline at end of file diff --git a/docs/models/operations/GetPinRequest.md b/docs/models/operations/GetPinRequest.md index 6925802f..6ea26022 100644 --- a/docs/models/operations/GetPinRequest.md +++ b/docs/models/operations/GetPinRequest.md @@ -3,10 +3,11 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | -| `strong` | *Optional* | :heavy_minus_sign: | Determines the kind of code returned by the API call
Strong codes are used for Pin authentication flows
Non-Strong codes are used for `Plex.tv/link`
| | -| `clientName` | *Optional* | :heavy_minus_sign: | N/A | Plex Web | -| `deviceName` | *Optional* | :heavy_minus_sign: | N/A | Linux | -| `clientVersion` | *Optional* | :heavy_minus_sign: | N/A | 4.133.0 | -| `clientPlatform` | *Optional* | :heavy_minus_sign: | N/A | Chrome | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `strong` | *Optional* | :heavy_minus_sign: | Determines the kind of code returned by the API call
Strong codes are used for Pin authentication flows
Non-Strong codes are used for `Plex.tv/link`
| | +| `clientID` | *Optional* | :heavy_minus_sign: | The unique identifier for the client application
This is used to track the client application and its usage
(UUID, serial number, or other number unique per device)
| gcgzw5rz2xovp84b4vha3a40 | +| `clientName` | *Optional* | :heavy_minus_sign: | N/A | Plex Web | +| `deviceName` | *Optional* | :heavy_minus_sign: | N/A | Linux | +| `clientVersion` | *Optional* | :heavy_minus_sign: | N/A | 4.133.0 | +| `clientPlatform` | *Optional* | :heavy_minus_sign: | N/A | Chrome | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedActiveDirection.md b/docs/models/operations/GetRecentlyAddedActiveDirection.md new file mode 100644 index 00000000..a0fa724f --- /dev/null +++ b/docs/models/operations/GetRecentlyAddedActiveDirection.md @@ -0,0 +1,12 @@ +# GetRecentlyAddedActiveDirection + +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/GetRecentlyAddedDefaultDirection.md b/docs/models/operations/GetRecentlyAddedDefaultDirection.md new file mode 100644 index 00000000..b7422fa4 --- /dev/null +++ b/docs/models/operations/GetRecentlyAddedDefaultDirection.md @@ -0,0 +1,12 @@ +# GetRecentlyAddedDefaultDirection + +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/GetRecentlyAddedField.md b/docs/models/operations/GetRecentlyAddedField.md new file mode 100644 index 00000000..f5152539 --- /dev/null +++ b/docs/models/operations/GetRecentlyAddedField.md @@ -0,0 +1,11 @@ +# GetRecentlyAddedField + + +## 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/GetRecentlyAddedFieldType.md b/docs/models/operations/GetRecentlyAddedFieldType.md new file mode 100644 index 00000000..4be42542 --- /dev/null +++ b/docs/models/operations/GetRecentlyAddedFieldType.md @@ -0,0 +1,9 @@ +# GetRecentlyAddedFieldType + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `type` | *String* | :heavy_check_mark: | N/A | tag | +| `operator` | List<[GetRecentlyAddedOperator](../../models/operations/GetRecentlyAddedOperator.md)> | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedFilter.md b/docs/models/operations/GetRecentlyAddedFilter.md new file mode 100644 index 00000000..14cb00d9 --- /dev/null +++ b/docs/models/operations/GetRecentlyAddedFilter.md @@ -0,0 +1,12 @@ +# GetRecentlyAddedFilter + + +## 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/GetRecentlyAddedHubsResponseType.md b/docs/models/operations/GetRecentlyAddedHubsResponseType.md new file mode 100644 index 00000000..eb8cad3e --- /dev/null +++ b/docs/models/operations/GetRecentlyAddedHubsResponseType.md @@ -0,0 +1,11 @@ +# GetRecentlyAddedHubsResponseType + + +## 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/GetRecentlyAddedHubsType.md b/docs/models/operations/GetRecentlyAddedHubsType.md new file mode 100644 index 00000000..eec1b201 --- /dev/null +++ b/docs/models/operations/GetRecentlyAddedHubsType.md @@ -0,0 +1,14 @@ +# GetRecentlyAddedHubsType + +The type of media content + + + +## Values + +| Name | Value | +| --------- | --------- | +| `Movie` | movie | +| `TvShow` | show | +| `Season` | season | +| `Episode` | episode | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedImage.md b/docs/models/operations/GetRecentlyAddedImage.md new file mode 100644 index 00000000..56656cb9 --- /dev/null +++ b/docs/models/operations/GetRecentlyAddedImage.md @@ -0,0 +1,10 @@ +# GetRecentlyAddedImage + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `alt` | *String* | :heavy_check_mark: | N/A | Episode 1 | +| `type` | [GetRecentlyAddedHubsResponseType](../../models/operations/GetRecentlyAddedHubsResponseType.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/GetRecentlyAddedLibraryCountry.md b/docs/models/operations/GetRecentlyAddedLibraryCountry.md new file mode 100644 index 00000000..3fb64825 --- /dev/null +++ b/docs/models/operations/GetRecentlyAddedLibraryCountry.md @@ -0,0 +1,8 @@ +# GetRecentlyAddedLibraryCountry + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | United States of America | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedLibraryDirector.md b/docs/models/operations/GetRecentlyAddedLibraryDirector.md new file mode 100644 index 00000000..0c907a40 --- /dev/null +++ b/docs/models/operations/GetRecentlyAddedLibraryDirector.md @@ -0,0 +1,8 @@ +# GetRecentlyAddedLibraryDirector + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | Peyton Reed | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedLibraryFilter.md b/docs/models/operations/GetRecentlyAddedLibraryFilter.md new file mode 100644 index 00000000..411b81d3 --- /dev/null +++ b/docs/models/operations/GetRecentlyAddedLibraryFilter.md @@ -0,0 +1,12 @@ +# GetRecentlyAddedLibraryFilter + + +## 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/GetRecentlyAddedLibraryGenre.md b/docs/models/operations/GetRecentlyAddedLibraryGenre.md new file mode 100644 index 00000000..8683db3b --- /dev/null +++ b/docs/models/operations/GetRecentlyAddedLibraryGenre.md @@ -0,0 +1,8 @@ +# GetRecentlyAddedLibraryGenre + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | Comedy | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedLibraryMedia.md b/docs/models/operations/GetRecentlyAddedLibraryMedia.md new file mode 100644 index 00000000..1548598b --- /dev/null +++ b/docs/models/operations/GetRecentlyAddedLibraryMedia.md @@ -0,0 +1,23 @@ +# GetRecentlyAddedLibraryMedia + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 120345 | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 7474422 | +| `bitrate` | *Optional* | :heavy_minus_sign: | N/A | 3623 | +| `width` | *Optional* | :heavy_minus_sign: | N/A | 1920 | +| `height` | *Optional* | :heavy_minus_sign: | N/A | 804 | +| `aspectRatio` | *Optional* | :heavy_minus_sign: | N/A | 2.35 | +| `audioChannels` | *Optional* | :heavy_minus_sign: | N/A | 6 | +| `audioCodec` | *Optional* | :heavy_minus_sign: | N/A | ac3 | +| `videoCodec` | *Optional* | :heavy_minus_sign: | N/A | h264 | +| `videoResolution` | *Optional* | :heavy_minus_sign: | N/A | 1080 | +| `container` | *Optional* | :heavy_minus_sign: | N/A | mp4 | +| `videoFrameRate` | *Optional* | :heavy_minus_sign: | N/A | 24p | +| `optimizedForStreaming` | *Optional* | :heavy_minus_sign: | N/A | 0 | +| `has64bitOffsets` | *Optional* | :heavy_minus_sign: | N/A | | +| `videoProfile` | *Optional* | :heavy_minus_sign: | N/A | high | +| `part` | List<[GetRecentlyAddedLibraryPart](../../models/operations/GetRecentlyAddedLibraryPart.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedLibraryMediaContainer.md b/docs/models/operations/GetRecentlyAddedLibraryMediaContainer.md new file mode 100644 index 00000000..1a564d63 --- /dev/null +++ b/docs/models/operations/GetRecentlyAddedLibraryMediaContainer.md @@ -0,0 +1,19 @@ +# GetRecentlyAddedLibraryMediaContainer + +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<[GetRecentlyAddedLibraryType](../../models/operations/GetRecentlyAddedLibraryType.md)> | :heavy_minus_sign: | N/A | | +| `fieldType` | List<[FieldType](../../models/operations/FieldType.md)> | :heavy_minus_sign: | N/A | | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 50 | +| `allowSync` | *Optional* | :heavy_minus_sign: | N/A | | +| `identifier` | *Optional* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `mediaTagPrefix` | *Optional* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | +| `mediaTagVersion` | *Optional* | :heavy_minus_sign: | N/A | 1680021154 | +| `mixedParents` | *Optional* | :heavy_minus_sign: | N/A | | +| `metadata` | List<[GetRecentlyAddedLibraryMetadata](../../models/operations/GetRecentlyAddedLibraryMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedLibraryMetadata.md b/docs/models/operations/GetRecentlyAddedLibraryMetadata.md new file mode 100644 index 00000000..49a14a51 --- /dev/null +++ b/docs/models/operations/GetRecentlyAddedLibraryMetadata.md @@ -0,0 +1,39 @@ +# GetRecentlyAddedLibraryMetadata + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `allowSync` | *Optional* | :heavy_minus_sign: | N/A | | +| `librarySectionID` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `librarySectionTitle` | *Optional* | :heavy_minus_sign: | N/A | Movies | +| `librarySectionUUID` | *Optional* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | +| `ratingKey` | *Optional* | :heavy_minus_sign: | N/A | 59398 | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/59398 | +| `guid` | *Optional* | :heavy_minus_sign: | N/A | plex://movie/5e161a83bea6ac004126e148 | +| `studio` | *Optional* | :heavy_minus_sign: | N/A | Marvel Studios | +| `type` | *Optional* | :heavy_minus_sign: | N/A | movie | +| `title` | *Optional* | :heavy_minus_sign: | N/A | Ant-Man and the Wasp: Quantumania | +| `contentRating` | *Optional* | :heavy_minus_sign: | N/A | PG-13 | +| `summary` | *Optional* | :heavy_minus_sign: | N/A | Scott Lang and Hope Van Dyne along with Hank Pym and Janet Van Dyne explore the Quantum Realm where they interact with strange creatures and embark on an adventure that goes beyond the limits of what they thought was possible. | +| `rating` | *Optional* | :heavy_minus_sign: | N/A | 4.7 | +| `audienceRating` | *Optional* | :heavy_minus_sign: | N/A | 8.3 | +| `year` | *Optional* | :heavy_minus_sign: | N/A | 2023 | +| `tagline` | *Optional* | :heavy_minus_sign: | N/A | Witness the beginning of a new dynasty. | +| `thumb` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/59398/thumb/1681888010 | +| `art` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/59398/art/1681888010 | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 7474422 | +| `originallyAvailableAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | N/A | 2023-02-15 00:00:00 +0000 UTC | +| `addedAt` | *Optional* | :heavy_minus_sign: | N/A | 1681803215 | +| `updatedAt` | *Optional* | :heavy_minus_sign: | N/A | 1681888010 | +| `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/59399 | +| `ratingImage` | *Optional* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.rotten | +| `media` | List<[GetRecentlyAddedLibraryMedia](../../models/operations/GetRecentlyAddedLibraryMedia.md)> | :heavy_minus_sign: | N/A | | +| `genre` | List<[GetRecentlyAddedLibraryGenre](../../models/operations/GetRecentlyAddedLibraryGenre.md)> | :heavy_minus_sign: | N/A | | +| `director` | List<[GetRecentlyAddedLibraryDirector](../../models/operations/GetRecentlyAddedLibraryDirector.md)> | :heavy_minus_sign: | N/A | | +| `writer` | List<[GetRecentlyAddedLibraryWriter](../../models/operations/GetRecentlyAddedLibraryWriter.md)> | :heavy_minus_sign: | N/A | | +| `country` | List<[GetRecentlyAddedLibraryCountry](../../models/operations/GetRecentlyAddedLibraryCountry.md)> | :heavy_minus_sign: | N/A | | +| `role` | List<[GetRecentlyAddedLibraryRole](../../models/operations/GetRecentlyAddedLibraryRole.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedLibraryPart.md b/docs/models/operations/GetRecentlyAddedLibraryPart.md new file mode 100644 index 00000000..8fa08233 --- /dev/null +++ b/docs/models/operations/GetRecentlyAddedLibraryPart.md @@ -0,0 +1,17 @@ +# GetRecentlyAddedLibraryPart + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `id` | *Optional* | :heavy_minus_sign: | N/A | 120353 | +| `key` | *Optional* | :heavy_minus_sign: | N/A | /library/parts/120353/1681803203/file.mp4 | +| `duration` | *Optional* | :heavy_minus_sign: | N/A | 7474422 | +| `file` | *Optional* | :heavy_minus_sign: | N/A | /movies/Ant-Man and the Wasp Quantumania (2023)/Ant-Man.and.the.Wasp.Quantumania.2023.1080p.mp4 | +| `size` | *Optional* | :heavy_minus_sign: | N/A | 3395307162 | +| `container` | *Optional* | :heavy_minus_sign: | N/A | mp4 | +| `has64bitOffsets` | *Optional* | :heavy_minus_sign: | N/A | | +| `hasThumbnail` | *Optional* | :heavy_minus_sign: | N/A | 1 | +| `optimizedForStreaming` | *Optional* | :heavy_minus_sign: | N/A | | +| `videoProfile` | *Optional* | :heavy_minus_sign: | N/A | high | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedLibraryRequest.md b/docs/models/operations/GetRecentlyAddedLibraryRequest.md new file mode 100644 index 00000000..e88db189 --- /dev/null +++ b/docs/models/operations/GetRecentlyAddedLibraryRequest.md @@ -0,0 +1,14 @@ +# GetRecentlyAddedLibraryRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentDirectoryID` | *Optional* | :heavy_minus_sign: | N/A | 2 | +| `pinnedContentDirectoryID` | List<*long*> | :heavy_minus_sign: | N/A | [
3,
5,
7,
13,
12,
1,
6,
14,
2,
10,
16,
17
] | +| `sectionID` | *Optional* | :heavy_minus_sign: | The library section ID for filtering content. | 2 | +| `type` | [QueryParamType](../../models/operations/QueryParamType.md) | :heavy_check_mark: | The type of media to retrieve.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | +| `includeMeta` | [Optional](../../models/operations/QueryParamIncludeMeta.md) | :heavy_minus_sign: | Adds the Meta object to the response
| 1 | +| `xPlexContainerStart` | *Optional* | :heavy_minus_sign: | The index of the first item to return. If not specified, the first item will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 0
| 0 | +| `xPlexContainerSize` | *Optional* | :heavy_minus_sign: | The number of items to return. If not specified, all items will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 50
| 50 | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedLibraryResponse.md b/docs/models/operations/GetRecentlyAddedLibraryResponse.md new file mode 100644 index 00000000..23fd7ab6 --- /dev/null +++ b/docs/models/operations/GetRecentlyAddedLibraryResponse.md @@ -0,0 +1,11 @@ +# GetRecentlyAddedLibraryResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional](../../models/operations/GetRecentlyAddedLibraryResponseBody.md) | :heavy_minus_sign: | The recently added content | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedLibraryResponseBody.md b/docs/models/operations/GetRecentlyAddedLibraryResponseBody.md new file mode 100644 index 00000000..e81ca435 --- /dev/null +++ b/docs/models/operations/GetRecentlyAddedLibraryResponseBody.md @@ -0,0 +1,10 @@ +# GetRecentlyAddedLibraryResponseBody + +The recently added content + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [Optional](../../models/operations/GetRecentlyAddedLibraryMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedLibraryRole.md b/docs/models/operations/GetRecentlyAddedLibraryRole.md new file mode 100644 index 00000000..2e5f19d7 --- /dev/null +++ b/docs/models/operations/GetRecentlyAddedLibraryRole.md @@ -0,0 +1,8 @@ +# GetRecentlyAddedLibraryRole + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | Paul Rudd | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedLibraryType.md b/docs/models/operations/GetRecentlyAddedLibraryType.md new file mode 100644 index 00000000..f6df347c --- /dev/null +++ b/docs/models/operations/GetRecentlyAddedLibraryType.md @@ -0,0 +1,14 @@ +# GetRecentlyAddedLibraryType + + +## 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 | show | +| `title` | *String* | :heavy_check_mark: | N/A | TV Shows | +| `active` | *boolean* | :heavy_check_mark: | N/A | false | +| `filter` | List<[GetRecentlyAddedLibraryFilter](../../models/operations/GetRecentlyAddedLibraryFilter.md)> | :heavy_minus_sign: | N/A | | +| `sort` | List<[Sort](../../models/operations/Sort.md)> | :heavy_minus_sign: | N/A | | +| `field` | List<[Field](../../models/operations/Field.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedLibraryWriter.md b/docs/models/operations/GetRecentlyAddedLibraryWriter.md new file mode 100644 index 00000000..580403b4 --- /dev/null +++ b/docs/models/operations/GetRecentlyAddedLibraryWriter.md @@ -0,0 +1,8 @@ +# GetRecentlyAddedLibraryWriter + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `tag` | *Optional* | :heavy_minus_sign: | N/A | Jeff Loveness | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedMediaContainer.md b/docs/models/operations/GetRecentlyAddedMediaContainer.md index 77f759ef..ce40f898 100644 --- a/docs/models/operations/GetRecentlyAddedMediaContainer.md +++ b/docs/models/operations/GetRecentlyAddedMediaContainer.md @@ -3,12 +3,12 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `size` | *Optional* | :heavy_minus_sign: | N/A | 50 | -| `allowSync` | *Optional* | :heavy_minus_sign: | N/A | | -| `identifier` | *Optional* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `mediaTagPrefix` | *Optional* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | -| `mediaTagVersion` | *Optional* | :heavy_minus_sign: | N/A | 1680021154 | -| `mixedParents` | *Optional* | :heavy_minus_sign: | N/A | | -| `metadata` | List<[GetRecentlyAddedMetadata](../../models/operations/GetRecentlyAddedMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `size` | *double* | :heavy_check_mark: | N/A | 50 | +| `offset` | *Optional* | :heavy_minus_sign: | N/A | | +| `totalSize` | *Optional* | :heavy_minus_sign: | N/A | | +| `identifier` | *Optional* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `allowSync` | *Optional* | :heavy_minus_sign: | N/A | | +| `meta` | [Optional](../../models/operations/Meta.md) | :heavy_minus_sign: | The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
| | +| `metadata` | List<[GetRecentlyAddedMetadata](../../models/operations/GetRecentlyAddedMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedMetadata.md b/docs/models/operations/GetRecentlyAddedMetadata.md index a510fe0b..91aef71c 100644 --- a/docs/models/operations/GetRecentlyAddedMetadata.md +++ b/docs/models/operations/GetRecentlyAddedMetadata.md @@ -3,37 +3,78 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `allowSync` | *Optional* | :heavy_minus_sign: | N/A | | -| `librarySectionID` | *Optional* | :heavy_minus_sign: | N/A | 1 | -| `librarySectionTitle` | *Optional* | :heavy_minus_sign: | N/A | Movies | -| `librarySectionUUID` | *Optional* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | -| `ratingKey` | *Optional* | :heavy_minus_sign: | N/A | 59398 | -| `key` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/59398 | -| `guid` | *Optional* | :heavy_minus_sign: | N/A | plex://movie/5e161a83bea6ac004126e148 | -| `studio` | *Optional* | :heavy_minus_sign: | N/A | Marvel Studios | -| `type` | *Optional* | :heavy_minus_sign: | N/A | movie | -| `title` | *Optional* | :heavy_minus_sign: | N/A | Ant-Man and the Wasp: Quantumania | -| `contentRating` | *Optional* | :heavy_minus_sign: | N/A | PG-13 | -| `summary` | *Optional* | :heavy_minus_sign: | N/A | Scott Lang and Hope Van Dyne along with Hank Pym and Janet Van Dyne explore the Quantum Realm where they interact with strange creatures and embark on an adventure that goes beyond the limits of what they thought was possible. | -| `rating` | *Optional* | :heavy_minus_sign: | N/A | 4.7 | -| `audienceRating` | *Optional* | :heavy_minus_sign: | N/A | 8.3 | -| `year` | *Optional* | :heavy_minus_sign: | N/A | 2023 | -| `tagline` | *Optional* | :heavy_minus_sign: | N/A | Witness the beginning of a new dynasty. | -| `thumb` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/59398/thumb/1681888010 | -| `art` | *Optional* | :heavy_minus_sign: | N/A | /library/metadata/59398/art/1681888010 | -| `duration` | *Optional* | :heavy_minus_sign: | N/A | 7474422 | -| `originallyAvailableAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | N/A | 2023-02-15 00:00:00 +0000 UTC | -| `addedAt` | *Optional* | :heavy_minus_sign: | N/A | 1681803215 | -| `updatedAt` | *Optional* | :heavy_minus_sign: | N/A | 1681888010 | -| `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/59399 | -| `ratingImage` | *Optional* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.rotten | -| `media` | List<[Media](../../models/operations/Media.md)> | :heavy_minus_sign: | N/A | | -| `genre` | List<[Genre](../../models/operations/Genre.md)> | :heavy_minus_sign: | N/A | | -| `director` | List<[Director](../../models/operations/Director.md)> | :heavy_minus_sign: | N/A | | -| `writer` | List<[Writer](../../models/operations/Writer.md)> | :heavy_minus_sign: | N/A | | -| `country` | List<[Country](../../models/operations/Country.md)> | :heavy_minus_sign: | N/A | | -| `role` | List<[Role](../../models/operations/Role.md)> | :heavy_minus_sign: | N/A | | \ 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: 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` | [GetRecentlyAddedHubsType](../../models/operations/GetRecentlyAddedHubsType.md) | :heavy_check_mark: | The type of media content
| 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: | N/A | 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)).
| dvd | +| `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<[Media](../../models/operations/Media.md)> | :heavy_minus_sign: | The Media object is only included when type query is `4` or higher.
| | +| `genre` | List<[Genre](../../models/operations/Genre.md)> | :heavy_minus_sign: | N/A | | +| `country` | List<[Country](../../models/operations/Country.md)> | :heavy_minus_sign: | N/A | | +| `director` | List<[Director](../../models/operations/Director.md)> | :heavy_minus_sign: | N/A | | +| `writer` | List<[Writer](../../models/operations/Writer.md)> | :heavy_minus_sign: | N/A | | +| `collection` | List<[Collection](../../models/operations/Collection.md)> | :heavy_minus_sign: | N/A | | +| `role` | List<[Role](../../models/operations/Role.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/UltraBlurColors.md) | :heavy_minus_sign: | N/A | | +| `metaDataRating` | List<[MetaDataRating](../../models/operations/MetaDataRating.md)> | :heavy_minus_sign: | N/A | | +| `image` | List<[GetRecentlyAddedImage](../../models/operations/GetRecentlyAddedImage.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 diff --git a/docs/models/operations/GetRecentlyAddedOperator.md b/docs/models/operations/GetRecentlyAddedOperator.md new file mode 100644 index 00000000..d26a9e64 --- /dev/null +++ b/docs/models/operations/GetRecentlyAddedOperator.md @@ -0,0 +1,9 @@ +# GetRecentlyAddedOperator + + +## 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/GetRecentlyAddedRequest.md b/docs/models/operations/GetRecentlyAddedRequest.md index bc0e61fe..e6585e55 100644 --- a/docs/models/operations/GetRecentlyAddedRequest.md +++ b/docs/models/operations/GetRecentlyAddedRequest.md @@ -5,5 +5,10 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentDirectoryID` | *long* | :heavy_check_mark: | The content directory ID. | | +| `pinnedContentDirectoryID` | *Optional* | :heavy_minus_sign: | Comma-separated list of pinned content directory IDs. | | +| `sectionID` | *Optional* | :heavy_minus_sign: | The library section ID for filtering content. | 2 | +| `type` | [Type](../../models/operations/Type.md) | :heavy_check_mark: | The type of media to retrieve.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | +| `includeMeta` | [Optional](../../models/operations/IncludeMeta.md) | :heavy_minus_sign: | Adds the Meta object to the response
| 1 | | `xPlexContainerStart` | *Optional* | :heavy_minus_sign: | The index of the first item to return. If not specified, the first item will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 0
| 0 | | `xPlexContainerSize` | *Optional* | :heavy_minus_sign: | The number of items to return. If not specified, all items will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 50
| 50 | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedResponse.md b/docs/models/operations/GetRecentlyAddedResponse.md index e28eceef..04dd03e9 100644 --- a/docs/models/operations/GetRecentlyAddedResponse.md +++ b/docs/models/operations/GetRecentlyAddedResponse.md @@ -8,4 +8,4 @@ | `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | | `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `object` | [Optional](../../models/operations/GetRecentlyAddedResponseBody.md) | :heavy_minus_sign: | The recently added content | \ No newline at end of file +| `object` | [Optional](../../models/operations/GetRecentlyAddedResponseBody.md) | :heavy_minus_sign: | A successful response with recently added content. | \ No newline at end of file diff --git a/docs/models/operations/GetRecentlyAddedResponseBody.md b/docs/models/operations/GetRecentlyAddedResponseBody.md index 0d503b9b..24e34738 100644 --- a/docs/models/operations/GetRecentlyAddedResponseBody.md +++ b/docs/models/operations/GetRecentlyAddedResponseBody.md @@ -1,6 +1,6 @@ # GetRecentlyAddedResponseBody -The recently added content +A successful response with recently added content. ## Fields diff --git a/docs/models/operations/GetRecentlyAddedSort.md b/docs/models/operations/GetRecentlyAddedSort.md new file mode 100644 index 00000000..30590ea4 --- /dev/null +++ b/docs/models/operations/GetRecentlyAddedSort.md @@ -0,0 +1,15 @@ +# GetRecentlyAddedSort + + +## 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/GetRecentlyAddedActiveDirection.md) | :heavy_minus_sign: | The direction of the sort. Can be either `asc` or `desc`.
| asc | +| `defaultDirection` | [Optional](../../models/operations/GetRecentlyAddedDefaultDirection.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/GetRecentlyAddedType.md b/docs/models/operations/GetRecentlyAddedType.md new file mode 100644 index 00000000..41f66d4b --- /dev/null +++ b/docs/models/operations/GetRecentlyAddedType.md @@ -0,0 +1,14 @@ +# GetRecentlyAddedType + + +## 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 | show | +| `title` | *String* | :heavy_check_mark: | N/A | TV Shows | +| `active` | *boolean* | :heavy_check_mark: | N/A | false | +| `filter` | List<[GetRecentlyAddedFilter](../../models/operations/GetRecentlyAddedFilter.md)> | :heavy_minus_sign: | N/A | | +| `sort` | List<[GetRecentlyAddedSort](../../models/operations/GetRecentlyAddedSort.md)> | :heavy_minus_sign: | N/A | | +| `field` | List<[GetRecentlyAddedField](../../models/operations/GetRecentlyAddedField.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetSearchLibraryQueryParamType.md b/docs/models/operations/GetSearchLibraryQueryParamType.md new file mode 100644 index 00000000..96e485bc --- /dev/null +++ b/docs/models/operations/GetSearchLibraryQueryParamType.md @@ -0,0 +1,19 @@ +# GetSearchLibraryQueryParamType + +The type of media to retrieve. +1 = movie +2 = show +3 = season +4 = episode +E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + + + +## Values + +| Name | Value | +| --------- | --------- | +| `Movie` | 1 | +| `TvShow` | 2 | +| `Season` | 3 | +| `Episode` | 4 | \ No newline at end of file diff --git a/docs/models/operations/GetSearchLibraryRequest.md b/docs/models/operations/GetSearchLibraryRequest.md index c09cfe0b..0bb4fa97 100644 --- a/docs/models/operations/GetSearchLibraryRequest.md +++ b/docs/models/operations/GetSearchLibraryRequest.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `sectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | -| `type` | [QueryParamType](../../models/operations/QueryParamType.md) | :heavy_check_mark: | The type of media to retrieve.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | \ No newline at end of file +| `type` | [GetSearchLibraryQueryParamType](../../models/operations/GetSearchLibraryQueryParamType.md) | :heavy_check_mark: | The type of media to retrieve.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | \ No newline at end of file diff --git a/docs/models/operations/LibrarySectionID.md b/docs/models/operations/LibrarySectionID.md deleted file mode 100644 index 51c90cc6..00000000 --- a/docs/models/operations/LibrarySectionID.md +++ /dev/null @@ -1,2 +0,0 @@ -# LibrarySectionID - diff --git a/docs/models/operations/Media.md b/docs/models/operations/Media.md index 5115e73b..00727c8b 100644 --- a/docs/models/operations/Media.md +++ b/docs/models/operations/Media.md @@ -3,21 +3,23 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| `id` | *Optional* | :heavy_minus_sign: | N/A | 120345 | -| `duration` | *Optional* | :heavy_minus_sign: | N/A | 7474422 | -| `bitrate` | *Optional* | :heavy_minus_sign: | N/A | 3623 | -| `width` | *Optional* | :heavy_minus_sign: | N/A | 1920 | -| `height` | *Optional* | :heavy_minus_sign: | N/A | 804 | -| `aspectRatio` | *Optional* | :heavy_minus_sign: | N/A | 2.35 | -| `audioChannels` | *Optional* | :heavy_minus_sign: | N/A | 6 | -| `audioCodec` | *Optional* | :heavy_minus_sign: | N/A | ac3 | -| `videoCodec` | *Optional* | :heavy_minus_sign: | N/A | h264 | -| `videoResolution` | *Optional* | :heavy_minus_sign: | N/A | 1080 | -| `container` | *Optional* | :heavy_minus_sign: | N/A | mp4 | -| `videoFrameRate` | *Optional* | :heavy_minus_sign: | N/A | 24p | -| `optimizedForStreaming` | *Optional* | :heavy_minus_sign: | N/A | 0 | -| `has64bitOffsets` | *Optional* | :heavy_minus_sign: | N/A | | -| `videoProfile` | *Optional* | :heavy_minus_sign: | N/A | high | -| `part` | List<[Part](../../models/operations/Part.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `id` | *int* | :heavy_check_mark: | N/A | 119534 | +| `duration` | *int* | :heavy_check_mark: | N/A | 11558112 | +| `bitrate` | *int* | :heavy_check_mark: | N/A | 25025 | +| `width` | *int* | :heavy_check_mark: | N/A | 3840 | +| `height` | *int* | :heavy_check_mark: | N/A | 2072 | +| `aspectRatio` | *double* | :heavy_check_mark: | N/A | 1.85 | +| `audioProfile` | *Optional* | :heavy_minus_sign: | N/A | dts | +| `audioChannels` | *int* | :heavy_check_mark: | N/A | 6 | +| `audioCodec` | *String* | :heavy_check_mark: | N/A | eac3 | +| `videoCodec` | *String* | :heavy_check_mark: | N/A | hevc | +| `videoResolution` | *String* | :heavy_check_mark: | N/A | 4k | +| `container` | *String* | :heavy_check_mark: | N/A | mkv | +| `videoFrameRate` | *String* | :heavy_check_mark: | N/A | 24p | +| `videoProfile` | *String* | :heavy_check_mark: | N/A | main 10 | +| `hasVoiceActivity` | *Optional* | :heavy_minus_sign: | N/A | false | +| `optimizedForStreaming` | [Optional](../../models/operations/OptimizedForStreaming.md) | :heavy_minus_sign: | N/A | 1 | +| `has64bitOffsets` | *Optional* | :heavy_minus_sign: | N/A | false | +| `part` | List<[Part](../../models/operations/Part.md)> | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/Meta.md b/docs/models/operations/Meta.md index a03175b9..bd79a2c1 100644 --- a/docs/models/operations/Meta.md +++ b/docs/models/operations/Meta.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<[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 +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `type` | List<[GetRecentlyAddedType](../../models/operations/GetRecentlyAddedType.md)> | :heavy_minus_sign: | N/A | +| `fieldType` | List<[GetRecentlyAddedFieldType](../../models/operations/GetRecentlyAddedFieldType.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/MetaDataRating.md b/docs/models/operations/MetaDataRating.md new file mode 100644 index 00000000..33debb0a --- /dev/null +++ b/docs/models/operations/MetaDataRating.md @@ -0,0 +1,10 @@ +# MetaDataRating + + +## 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/Operator.md b/docs/models/operations/Operator.md index ba8a9f58..0af7a2d0 100644 --- a/docs/models/operations/Operator.md +++ b/docs/models/operations/Operator.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | Example | | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `key` | *Optional* | :heavy_minus_sign: | N/A | = | -| `title` | *Optional* | :heavy_minus_sign: | N/A | is | \ No newline at end of file +| `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/OptimizedForStreaming.md b/docs/models/operations/OptimizedForStreaming.md new file mode 100644 index 00000000..6485ce7f --- /dev/null +++ b/docs/models/operations/OptimizedForStreaming.md @@ -0,0 +1,9 @@ +# OptimizedForStreaming + + +## Values + +| Name | Value | +| --------- | --------- | +| `Disable` | 0 | +| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/Part.md b/docs/models/operations/Part.md index 5f832eeb..8ac0e890 100644 --- a/docs/models/operations/Part.md +++ b/docs/models/operations/Part.md @@ -3,15 +3,18 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `id` | *Optional* | :heavy_minus_sign: | N/A | 120353 | -| `key` | *Optional* | :heavy_minus_sign: | N/A | /library/parts/120353/1681803203/file.mp4 | -| `duration` | *Optional* | :heavy_minus_sign: | N/A | 7474422 | -| `file` | *Optional* | :heavy_minus_sign: | N/A | /movies/Ant-Man and the Wasp Quantumania (2023)/Ant-Man.and.the.Wasp.Quantumania.2023.1080p.mp4 | -| `size` | *Optional* | :heavy_minus_sign: | N/A | 3395307162 | -| `container` | *Optional* | :heavy_minus_sign: | N/A | mp4 | -| `has64bitOffsets` | *Optional* | :heavy_minus_sign: | N/A | | -| `hasThumbnail` | *Optional* | :heavy_minus_sign: | N/A | 1 | -| `optimizedForStreaming` | *Optional* | :heavy_minus_sign: | N/A | | -| `videoProfile` | *Optional* | :heavy_minus_sign: | N/A | high | \ No newline at end of file +| 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` | *int* | :heavy_check_mark: | 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` | *String* | :heavy_check_mark: | N/A | main 10 | +| `indexes` | *Optional* | :heavy_minus_sign: | N/A | sd | +| `hasThumbnail` | [Optional](../../models/operations/HasThumbnail.md) | :heavy_minus_sign: | N/A | 1 | +| `stream` | List<[Stream](../../models/operations/Stream.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/PostUsersSignInDataRequest.md b/docs/models/operations/PostUsersSignInDataRequest.md new file mode 100644 index 00000000..996ffde3 --- /dev/null +++ b/docs/models/operations/PostUsersSignInDataRequest.md @@ -0,0 +1,13 @@ +# PostUsersSignInDataRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `clientID` | *Optional* | :heavy_minus_sign: | The unique identifier for the client application
This is used to track the client application and its usage
(UUID, serial number, or other number unique per device)
| gcgzw5rz2xovp84b4vha3a40 | +| `clientName` | *Optional* | :heavy_minus_sign: | N/A | Plex Web | +| `deviceName` | *Optional* | :heavy_minus_sign: | N/A | Linux | +| `clientVersion` | *Optional* | :heavy_minus_sign: | N/A | 4.133.0 | +| `clientPlatform` | *Optional* | :heavy_minus_sign: | N/A | Chrome | +| `requestBody` | [Optional](../../models/operations/PostUsersSignInDataRequestBody.md) | :heavy_minus_sign: | Login credentials | | \ No newline at end of file diff --git a/docs/models/operations/QueryParamIncludeMeta.md b/docs/models/operations/QueryParamIncludeMeta.md new file mode 100644 index 00000000..85296cc2 --- /dev/null +++ b/docs/models/operations/QueryParamIncludeMeta.md @@ -0,0 +1,12 @@ +# QueryParamIncludeMeta + +Adds the Meta object to the response + + + +## Values + +| Name | Value | +| --------- | --------- | +| `Disable` | 0 | +| `Enable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/Role.md b/docs/models/operations/Role.md index fa3689ab..bca034b1 100644 --- a/docs/models/operations/Role.md +++ b/docs/models/operations/Role.md @@ -3,6 +3,11 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `tag` | *Optional* | :heavy_minus_sign: | N/A | Paul Rudd | \ No newline at end of file +| 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 diff --git a/docs/models/operations/Sort.md b/docs/models/operations/Sort.md index 8158665e..5cc8f4aa 100644 --- a/docs/models/operations/Sort.md +++ b/docs/models/operations/Sort.md @@ -3,11 +3,13 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | -| `default_` | *Optional* | :heavy_minus_sign: | N/A | asc | -| `defaultDirection` | *Optional* | :heavy_minus_sign: | N/A | desc | -| `descKey` | *Optional* | :heavy_minus_sign: | N/A | random:desc | -| `firstCharacterKey` | *Optional* | :heavy_minus_sign: | N/A | /library/sections/1/firstCharacter | -| `key` | *Optional* | :heavy_minus_sign: | N/A | random | -| `title` | *Optional* | :heavy_minus_sign: | N/A | Randomly | \ No newline at end of file +| 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/ActiveDirection.md) | :heavy_minus_sign: | The direction of the sort. Can be either `asc` or `desc`.
| asc | +| `defaultDirection` | [Optional](../../models/operations/DefaultDirection.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/Stream.md b/docs/models/operations/Stream.md index 6d998068..4f7aa993 100644 --- a/docs/models/operations/Stream.md +++ b/docs/models/operations/Stream.md @@ -3,37 +3,43 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `id` | *Optional* | :heavy_minus_sign: | N/A | 29 | -| `streamType` | *Optional* | :heavy_minus_sign: | N/A | 2 | -| `default_` | *Optional* | :heavy_minus_sign: | N/A | true | -| `codec` | *Optional* | :heavy_minus_sign: | N/A | aac | -| `index` | *Optional* | :heavy_minus_sign: | N/A | 0 | -| `bitrate` | *Optional* | :heavy_minus_sign: | N/A | 128 | -| `bitDepth` | *Optional* | :heavy_minus_sign: | N/A | 8 | -| `chromaLocation` | *Optional* | :heavy_minus_sign: | N/A | left | -| `chromaSubsampling` | *Optional* | :heavy_minus_sign: | N/A | 14520 | -| `codedHeight` | *Optional* | :heavy_minus_sign: | N/A | 816 | -| `codedWidth` | *Optional* | :heavy_minus_sign: | N/A | 1920 | -| `colorPrimaries` | *Optional* | :heavy_minus_sign: | N/A | bt709 | -| `colorRange` | *Optional* | :heavy_minus_sign: | N/A | tv | -| `colorSpace` | *Optional* | :heavy_minus_sign: | N/A | bt709 | -| `colorTrc` | *Optional* | :heavy_minus_sign: | N/A | bt709 | -| `frameRate` | *Optional* | :heavy_minus_sign: | N/A | 24 | -| `hasScalingMatrix` | *Optional* | :heavy_minus_sign: | N/A | false | -| `height` | *Optional* | :heavy_minus_sign: | N/A | 814 | -| `level` | *Optional* | :heavy_minus_sign: | N/A | 40 | -| `profile` | *Optional* | :heavy_minus_sign: | N/A | lc | -| `refFrames` | *Optional* | :heavy_minus_sign: | N/A | 4 | -| `scanType` | *Optional* | :heavy_minus_sign: | N/A | progressive | -| `streamIdentifier` | *Optional* | :heavy_minus_sign: | N/A | 1 | -| `width` | *Optional* | :heavy_minus_sign: | N/A | 1920 | -| `displayTitle` | *Optional* | :heavy_minus_sign: | N/A | English (AAC Stereo) | -| `extendedDisplayTitle` | *Optional* | :heavy_minus_sign: | N/A | English (AAC Stereo) | -| `selected` | *Optional* | :heavy_minus_sign: | N/A | true | -| `channels` | *Optional* | :heavy_minus_sign: | N/A | 2 | -| `language` | *Optional* | :heavy_minus_sign: | N/A | English | -| `languageTag` | *Optional* | :heavy_minus_sign: | N/A | en | -| `languageCode` | *Optional* | :heavy_minus_sign: | N/A | eng | -| `samplingRate` | *Optional* | :heavy_minus_sign: | N/A | 44100 | \ No newline at end of file +| 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/Writer.md b/docs/models/operations/Writer.md index ee8d0e71..ee3b958f 100644 --- a/docs/models/operations/Writer.md +++ b/docs/models/operations/Writer.md @@ -5,4 +5,4 @@ | Field | Type | Required | Description | Example | | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `tag` | *Optional* | :heavy_minus_sign: | N/A | Jeff Loveness | \ No newline at end of file +| `tag` | *Optional* | :heavy_minus_sign: | N/A | James Cameron | \ No newline at end of file diff --git a/docs/sdks/authentication/README.md b/docs/sdks/authentication/README.md index 975a1403..4f2d28f1 100644 --- a/docs/sdks/authentication/README.md +++ b/docs/sdks/authentication/README.md @@ -105,7 +105,7 @@ public class Application { .build(); GetSourceConnectionInformationResponse res = sdk.authentication().getSourceConnectionInformation() - .source("provider://provider-identifier") + .source("server://client-identifier") .call(); // handle response @@ -201,6 +201,7 @@ package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.PostUsersSignInDataBadRequest; import dev.plexapi.sdk.models.errors.PostUsersSignInDataUnauthorized; +import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequest; import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequestBody; import dev.plexapi.sdk.models.operations.PostUsersSignInDataResponse; import java.lang.Exception; @@ -217,10 +218,12 @@ public class Application { .deviceName("Linux") .build(); - PostUsersSignInDataRequestBody req = PostUsersSignInDataRequestBody.builder() - .login("username@email.com") - .password("password123") - .verificationCode("123456") + PostUsersSignInDataRequest req = PostUsersSignInDataRequest.builder() + .requestBody(PostUsersSignInDataRequestBody.builder() + .login("username@email.com") + .password("password123") + .verificationCode("123456") + .build()) .build(); PostUsersSignInDataResponse res = sdk.authentication().postUsersSignInData() @@ -236,10 +239,10 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `request` | [PostUsersSignInDataRequestBody](../../models/operations/PostUsersSignInDataRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | -| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `request` | [PostUsersSignInDataRequest](../../models/operations/PostUsersSignInDataRequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | ### Response diff --git a/docs/sdks/hubs/README.md b/docs/sdks/hubs/README.md index 0ae96c86..9e7f4306 100644 --- a/docs/sdks/hubs/README.md +++ b/docs/sdks/hubs/README.md @@ -9,6 +9,7 @@ Hubs are a structured two-dimensional container for media, generally represented ### Available Operations * [getGlobalHubs](#getglobalhubs) - Get Global Hubs +* [getRecentlyAdded](#getrecentlyadded) - Get Recently Added * [getLibraryHubs](#getlibraryhubs) - Get library specific hubs ## getGlobalHubs @@ -72,6 +73,73 @@ public class Application { | models/errors/SDKError | 4xx-5xx | \*\/* | +## getRecentlyAdded + +This endpoint will return the recently added content. + + +### Example Usage + +```java +package hello.world; + +import dev.plexapi.sdk.PlexAPI; +import dev.plexapi.sdk.models.operations.GetRecentlyAddedRequest; +import dev.plexapi.sdk.models.operations.GetRecentlyAddedResponse; +import dev.plexapi.sdk.models.operations.IncludeMeta; +import dev.plexapi.sdk.models.operations.Type; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + PlexAPI sdk = PlexAPI.builder() + .accessToken("") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") + .build(); + + GetRecentlyAddedRequest req = GetRecentlyAddedRequest.builder() + .contentDirectoryID(470161L) + .type(Type.TvShow) + .sectionID(2L) + .includeMeta(IncludeMeta.Enable) + .xPlexContainerStart(0) + .xPlexContainerSize(50) + .build(); + + GetRecentlyAddedResponse res = sdk.hubs().getRecentlyAdded() + .request(req) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `request` | [GetRecentlyAddedRequest](../../models/operations/GetRecentlyAddedRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetRecentlyAddedResponse](../../models/operations/GetRecentlyAddedResponse.md)** + +### Errors + +| Error Object | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4xx-5xx | \*\/* | + + ## getLibraryHubs This endpoint will return a list of library specific hubs diff --git a/docs/sdks/library/README.md b/docs/sdks/library/README.md index f19ac9ca..1d84200c 100644 --- a/docs/sdks/library/README.md +++ b/docs/sdks/library/README.md @@ -9,7 +9,7 @@ API Calls interacting with Plex Media Server Libraries ### Available Operations * [getFileHash](#getfilehash) - Get Hash Value -* [getRecentlyAdded](#getrecentlyadded) - Get Recently Added +* [getRecentlyAddedLibrary](#getrecentlyaddedlibrary) - Get Recently Added * [getAllLibraries](#getalllibraries) - Get All Libraries * [getLibraryDetails](#getlibrarydetails) - Get Library Details * [deleteLibrary](#deletelibrary) - Delete Library Section @@ -79,7 +79,7 @@ public class Application { | models/errors/SDKError | 4xx-5xx | \*\/* | -## getRecentlyAdded +## getRecentlyAddedLibrary This endpoint will return the recently added content. @@ -90,14 +90,18 @@ This endpoint will return the recently added content. package hello.world; import dev.plexapi.sdk.PlexAPI; -import dev.plexapi.sdk.models.errors.GetRecentlyAddedBadRequest; -import dev.plexapi.sdk.models.errors.GetRecentlyAddedUnauthorized; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedResponse; +import dev.plexapi.sdk.models.errors.GetRecentlyAddedLibraryBadRequest; +import dev.plexapi.sdk.models.errors.GetRecentlyAddedLibraryUnauthorized; +import dev.plexapi.sdk.models.operations.GetRecentlyAddedLibraryRequest; +import dev.plexapi.sdk.models.operations.GetRecentlyAddedLibraryResponse; +import dev.plexapi.sdk.models.operations.QueryParamIncludeMeta; +import dev.plexapi.sdk.models.operations.QueryParamType; import java.lang.Exception; +import java.util.List; public class Application { - public static void main(String[] args) throws GetRecentlyAddedBadRequest, GetRecentlyAddedUnauthorized, Exception { + public static void main(String[] args) throws GetRecentlyAddedLibraryBadRequest, GetRecentlyAddedLibraryUnauthorized, Exception { PlexAPI sdk = PlexAPI.builder() .accessToken("") @@ -108,9 +112,30 @@ public class Application { .deviceName("Linux") .build(); - GetRecentlyAddedResponse res = sdk.library().getRecentlyAdded() + GetRecentlyAddedLibraryRequest req = GetRecentlyAddedLibraryRequest.builder() + .type(QueryParamType.TvShow) + .contentDirectoryID(2L) + .pinnedContentDirectoryID(List.of( + 3L, + 5L, + 7L, + 13L, + 12L, + 1L, + 6L, + 14L, + 2L, + 10L, + 16L, + 17L)) + .sectionID(2L) + .includeMeta(QueryParamIncludeMeta.Enable) .xPlexContainerStart(0) .xPlexContainerSize(50) + .build(); + + GetRecentlyAddedLibraryResponse res = sdk.library().getRecentlyAddedLibrary() + .request(req) .call(); if (res.object().isPresent()) { @@ -122,22 +147,21 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `xPlexContainerStart` | *Optional* | :heavy_minus_sign: | The index of the first item to return. If not specified, the first item will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 0
| 0 | -| `xPlexContainerSize` | *Optional* | :heavy_minus_sign: | The number of items to return. If not specified, all items will be returned.
If the number of items exceeds the limit, the response will be paginated.
By default this is 50
| 50 | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `request` | [GetRecentlyAddedLibraryRequest](../../models/operations/GetRecentlyAddedLibraryRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[GetRecentlyAddedResponse](../../models/operations/GetRecentlyAddedResponse.md)** +**[GetRecentlyAddedLibraryResponse](../../models/operations/GetRecentlyAddedLibraryResponse.md)** ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models/errors/GetRecentlyAddedBadRequest | 400 | application/json | -| models/errors/GetRecentlyAddedUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| Error Object | Status Code | Content Type | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| models/errors/GetRecentlyAddedLibraryBadRequest | 400 | application/json | +| models/errors/GetRecentlyAddedLibraryUnauthorized | 401 | application/json | +| models/errors/SDKError | 4xx-5xx | \*\/* | ## getAllLibraries @@ -385,12 +409,12 @@ package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetLibraryItemsBadRequest; import dev.plexapi.sdk.models.errors.GetLibraryItemsUnauthorized; +import dev.plexapi.sdk.models.operations.GetLibraryItemsQueryParamIncludeMeta; +import dev.plexapi.sdk.models.operations.GetLibraryItemsQueryParamType; import dev.plexapi.sdk.models.operations.GetLibraryItemsRequest; import dev.plexapi.sdk.models.operations.GetLibraryItemsResponse; import dev.plexapi.sdk.models.operations.IncludeGuids; -import dev.plexapi.sdk.models.operations.IncludeMeta; import dev.plexapi.sdk.models.operations.Tag; -import dev.plexapi.sdk.models.operations.Type; import java.lang.Exception; public class Application { @@ -410,8 +434,8 @@ public class Application { .sectionKey(9518) .tag(Tag.EDITION) .includeGuids(IncludeGuids.Enable) - .includeMeta(IncludeMeta.Enable) - .type(Type.TvShow) + .type(GetLibraryItemsQueryParamType.TvShow) + .includeMeta(GetLibraryItemsQueryParamIncludeMeta.Enable) .xPlexContainerStart(0) .xPlexContainerSize(50) .build(); @@ -536,8 +560,8 @@ package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.GetSearchLibraryBadRequest; import dev.plexapi.sdk.models.errors.GetSearchLibraryUnauthorized; +import dev.plexapi.sdk.models.operations.GetSearchLibraryQueryParamType; import dev.plexapi.sdk.models.operations.GetSearchLibraryResponse; -import dev.plexapi.sdk.models.operations.QueryParamType; import java.lang.Exception; public class Application { @@ -555,7 +579,7 @@ public class Application { GetSearchLibraryResponse res = sdk.library().getSearchLibrary() .sectionKey(9518) - .type(QueryParamType.TvShow) + .type(GetSearchLibraryQueryParamType.TvShow) .call(); if (res.object().isPresent()) { @@ -570,7 +594,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `sectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | -| `type` | [QueryParamType](../../models/operations/QueryParamType.md) | :heavy_check_mark: | The type of media to retrieve.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | +| `type` | [GetSearchLibraryQueryParamType](../../models/operations/GetSearchLibraryQueryParamType.md) | :heavy_check_mark: | The type of media to retrieve.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | ### Response diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md index 609fde6a..03ea0b23 100644 --- a/docs/sdks/search/README.md +++ b/docs/sdks/search/README.md @@ -54,7 +54,7 @@ public class Application { PerformSearchResponse res = sdk.search().performSearch() .query("dylan") - .sectionId(5838.67d) + .sectionId(9372.69d) .limit(5d) .call(); diff --git a/docs/sdks/server/README.md b/docs/sdks/server/README.md index c6003ace..6cfe1bbe 100644 --- a/docs/sdks/server/README.md +++ b/docs/sdks/server/README.md @@ -357,8 +357,8 @@ public class Application { .width(110d) .height(165d) .opacity(100L) - .blur(0d) - .minSize(MinSize.ONE) + .blur(20d) + .minSize(MinSize.ZERO) .upscale(Upscale.ONE) .url("/library/metadata/49564/thumb/1654258204") .build(); diff --git a/src/main/java/dev/plexapi/sdk/Authentication.java b/src/main/java/dev/plexapi/sdk/Authentication.java index 550cda51..5a500e7e 100644 --- a/src/main/java/dev/plexapi/sdk/Authentication.java +++ b/src/main/java/dev/plexapi/sdk/Authentication.java @@ -24,7 +24,7 @@ import dev.plexapi.sdk.models.operations.GetTransientTokenQueryParamType; import dev.plexapi.sdk.models.operations.GetTransientTokenRequest; import dev.plexapi.sdk.models.operations.GetTransientTokenRequestBuilder; import dev.plexapi.sdk.models.operations.GetTransientTokenResponse; -import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequestBody; +import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequest; import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequestBuilder; import dev.plexapi.sdk.models.operations.PostUsersSignInDataResponse; import dev.plexapi.sdk.models.operations.PostUsersSignInDataUserPlexAccount; @@ -559,11 +559,13 @@ public class Authentication implements /** * Get User Sign In Data * Sign in user with username and password and return user data with Plex authentication token + * @param request The request object containing all of the parameters for the API call. * @return The response from the API call * @throws Exception if the API call fails */ - public PostUsersSignInDataResponse postUsersSignInDataDirect() throws Exception { - return postUsersSignInData(Optional.empty(), Optional.empty()); + public PostUsersSignInDataResponse postUsersSignInData( + PostUsersSignInDataRequest request) throws Exception { + return postUsersSignInData(request, Optional.empty()); } /** @@ -575,7 +577,7 @@ public class Authentication implements * @throws Exception if the API call fails */ public PostUsersSignInDataResponse postUsersSignInData( - Optional request, + PostUsersSignInDataRequest request, Optional serverURL) throws Exception { String _baseUrl = Utils.templateUrl(POST_USERS_SIGN_IN_DATA_SERVERS[0], new HashMap()); if (serverURL.isPresent() && !serverURL.get().isBlank()) { @@ -589,10 +591,10 @@ public class Authentication implements Object _convertedRequest = Utils.convertToShape( request, JsonShape.DEFAULT, - new TypeReference>() {}); + new TypeReference() {}); SerializedBody _serializedRequestBody = Utils.serializeRequestBody( _convertedRequest, - "request", + "requestBody", "form", false); _req.setBody(Optional.ofNullable(_serializedRequestBody)); @@ -600,6 +602,11 @@ public class Authentication implements .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _req.addQueryParams(Utils.getQueryParams( + PostUsersSignInDataRequest.class, + request, + this.sdkConfiguration.globals)); + HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() diff --git a/src/main/java/dev/plexapi/sdk/Hubs.java b/src/main/java/dev/plexapi/sdk/Hubs.java index 2ae4ed2b..43a2e0d7 100644 --- a/src/main/java/dev/plexapi/sdk/Hubs.java +++ b/src/main/java/dev/plexapi/sdk/Hubs.java @@ -18,6 +18,10 @@ import dev.plexapi.sdk.models.operations.GetLibraryHubsRequest; import dev.plexapi.sdk.models.operations.GetLibraryHubsRequestBuilder; import dev.plexapi.sdk.models.operations.GetLibraryHubsResponse; import dev.plexapi.sdk.models.operations.GetLibraryHubsResponseBody; +import dev.plexapi.sdk.models.operations.GetRecentlyAddedRequest; +import dev.plexapi.sdk.models.operations.GetRecentlyAddedRequestBuilder; +import dev.plexapi.sdk.models.operations.GetRecentlyAddedResponse; +import dev.plexapi.sdk.models.operations.GetRecentlyAddedResponseBody; import dev.plexapi.sdk.models.operations.OnlyTransient; import dev.plexapi.sdk.models.operations.QueryParamOnlyTransient; import dev.plexapi.sdk.models.operations.SDKMethodInterfaces.*; @@ -42,6 +46,7 @@ import java.util.Optional; */ public class Hubs implements MethodCallGetGlobalHubs, + MethodCallGetRecentlyAdded, MethodCallGetLibraryHubs { private final SDKConfiguration sdkConfiguration; @@ -224,6 +229,130 @@ public class Hubs implements + /** + * Get Recently Added + * This endpoint will return the recently added content. + * + * @return The call builder + */ + public GetRecentlyAddedRequestBuilder getRecentlyAdded() { + return new GetRecentlyAddedRequestBuilder(this); + } + + /** + * Get Recently Added + * This endpoint will return the recently added content. + * + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetRecentlyAddedResponse getRecentlyAdded( + GetRecentlyAddedRequest request) throws Exception { + String _baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); + String _url = Utils.generateURL( + _baseUrl, + "/hubs/home/recentlyAdded"); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + GetRecentlyAddedRequest.class, + request, + this.sdkConfiguration.globals)); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "get-recently-added", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "401", "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "get-recently-added", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "get-recently-added", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "get-recently-added", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetRecentlyAddedResponse.Builder _resBuilder = + GetRecentlyAddedResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetRecentlyAddedResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetRecentlyAddedResponseBody _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withObject(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "401", "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + /** * Get library specific hubs * This endpoint will return a list of library specific hubs diff --git a/src/main/java/dev/plexapi/sdk/Library.java b/src/main/java/dev/plexapi/sdk/Library.java index 6798e804..4908acae 100644 --- a/src/main/java/dev/plexapi/sdk/Library.java +++ b/src/main/java/dev/plexapi/sdk/Library.java @@ -21,8 +21,8 @@ import dev.plexapi.sdk.models.errors.GetMetadataChildrenBadRequest; import dev.plexapi.sdk.models.errors.GetMetadataChildrenUnauthorized; import dev.plexapi.sdk.models.errors.GetOnDeckBadRequest; import dev.plexapi.sdk.models.errors.GetOnDeckUnauthorized; -import dev.plexapi.sdk.models.errors.GetRecentlyAddedBadRequest; -import dev.plexapi.sdk.models.errors.GetRecentlyAddedUnauthorized; +import dev.plexapi.sdk.models.errors.GetRecentlyAddedLibraryBadRequest; +import dev.plexapi.sdk.models.errors.GetRecentlyAddedLibraryUnauthorized; import dev.plexapi.sdk.models.errors.GetRefreshLibraryMetadataBadRequest; import dev.plexapi.sdk.models.errors.GetRefreshLibraryMetadataUnauthorized; import dev.plexapi.sdk.models.errors.GetSearchLibraryBadRequest; @@ -59,13 +59,14 @@ import dev.plexapi.sdk.models.operations.GetMetadataChildrenResponseBody; import dev.plexapi.sdk.models.operations.GetOnDeckRequestBuilder; import dev.plexapi.sdk.models.operations.GetOnDeckResponse; import dev.plexapi.sdk.models.operations.GetOnDeckResponseBody; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedRequest; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedRequestBuilder; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedResponse; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedResponseBody; +import dev.plexapi.sdk.models.operations.GetRecentlyAddedLibraryRequest; +import dev.plexapi.sdk.models.operations.GetRecentlyAddedLibraryRequestBuilder; +import dev.plexapi.sdk.models.operations.GetRecentlyAddedLibraryResponse; +import dev.plexapi.sdk.models.operations.GetRecentlyAddedLibraryResponseBody; import dev.plexapi.sdk.models.operations.GetRefreshLibraryMetadataRequest; import dev.plexapi.sdk.models.operations.GetRefreshLibraryMetadataRequestBuilder; import dev.plexapi.sdk.models.operations.GetRefreshLibraryMetadataResponse; +import dev.plexapi.sdk.models.operations.GetSearchLibraryQueryParamType; import dev.plexapi.sdk.models.operations.GetSearchLibraryRequest; import dev.plexapi.sdk.models.operations.GetSearchLibraryRequestBuilder; import dev.plexapi.sdk.models.operations.GetSearchLibraryResponse; @@ -76,7 +77,6 @@ import dev.plexapi.sdk.models.operations.GetTopWatchedContentRequestBuilder; import dev.plexapi.sdk.models.operations.GetTopWatchedContentResponse; import dev.plexapi.sdk.models.operations.GetTopWatchedContentResponseBody; import dev.plexapi.sdk.models.operations.IncludeDetails; -import dev.plexapi.sdk.models.operations.QueryParamType; import dev.plexapi.sdk.models.operations.SDKMethodInterfaces.*; import dev.plexapi.sdk.utils.HTTPClient; import dev.plexapi.sdk.utils.HTTPRequest; @@ -87,7 +87,6 @@ import dev.plexapi.sdk.utils.Utils; import java.io.InputStream; import java.lang.Double; import java.lang.Exception; -import java.lang.Integer; import java.lang.Long; import java.lang.String; import java.net.http.HttpRequest; @@ -101,7 +100,7 @@ import java.util.Optional; */ public class Library implements MethodCallGetFileHash, - MethodCallGetRecentlyAdded, + MethodCallGetRecentlyAddedLibrary, MethodCallGetAllLibraries, MethodCallGetLibraryDetails, MethodCallDeleteLibrary, @@ -290,46 +289,20 @@ public class Library implements * * @return The call builder */ - public GetRecentlyAddedRequestBuilder getRecentlyAdded() { - return new GetRecentlyAddedRequestBuilder(this); + public GetRecentlyAddedLibraryRequestBuilder getRecentlyAddedLibrary() { + return new GetRecentlyAddedLibraryRequestBuilder(this); } /** * Get Recently Added * This endpoint will return the recently added content. * + * @param request The request object containing all of the parameters for the API call. * @return The response from the API call * @throws Exception if the API call fails */ - public GetRecentlyAddedResponse getRecentlyAddedDirect() throws Exception { - return getRecentlyAdded(Optional.empty(), Optional.empty()); - } - - /** - * Get Recently Added - * This endpoint will return the recently added content. - * - * @param xPlexContainerStart The index of the first item to return. If not specified, the first item will be returned. - If the number of items exceeds the limit, the response will be paginated. - By default this is 0 - - * @param xPlexContainerSize The number of items to return. If not specified, all items will be returned. - If the number of items exceeds the limit, the response will be paginated. - By default this is 50 - - * @return The response from the API call - * @throws Exception if the API call fails - */ - public GetRecentlyAddedResponse getRecentlyAdded( - Optional xPlexContainerStart, - Optional xPlexContainerSize) throws Exception { - GetRecentlyAddedRequest request = - GetRecentlyAddedRequest - .builder() - .xPlexContainerStart(xPlexContainerStart) - .xPlexContainerSize(xPlexContainerSize) - .build(); - + public GetRecentlyAddedLibraryResponse getRecentlyAddedLibrary( + GetRecentlyAddedLibraryRequest request) throws Exception { String _baseUrl = Utils.templateUrl( this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults()); String _url = Utils.generateURL( @@ -342,7 +315,7 @@ public class Library implements SDKConfiguration.USER_AGENT); _req.addQueryParams(Utils.getQueryParams( - GetRecentlyAddedRequest.class, + GetRecentlyAddedLibraryRequest.class, request, this.sdkConfiguration.globals)); @@ -354,7 +327,7 @@ public class Library implements sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( - "getRecentlyAdded", + "get-recently-added-library", Optional.of(List.of()), sdkConfiguration.securitySource()), _req.build()); @@ -365,7 +338,7 @@ public class Library implements _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( - "getRecentlyAdded", + "get-recently-added-library", Optional.of(List.of()), sdkConfiguration.securitySource()), Optional.of(_httpRes), @@ -374,7 +347,7 @@ public class Library implements _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( - "getRecentlyAdded", + "get-recently-added-library", Optional.of(List.of()), sdkConfiguration.securitySource()), _httpRes); @@ -383,7 +356,7 @@ public class Library implements _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( - "getRecentlyAdded", + "get-recently-added-library", Optional.of(List.of()), sdkConfiguration.securitySource()), Optional.empty(), @@ -393,20 +366,20 @@ public class Library implements .headers() .firstValue("Content-Type") .orElse("application/octet-stream"); - GetRecentlyAddedResponse.Builder _resBuilder = - GetRecentlyAddedResponse + GetRecentlyAddedLibraryResponse.Builder _resBuilder = + GetRecentlyAddedLibraryResponse .builder() .contentType(_contentType) .statusCode(_httpRes.statusCode()) .rawResponse(_httpRes); - GetRecentlyAddedResponse _res = _resBuilder.build(); + GetRecentlyAddedLibraryResponse _res = _resBuilder.build(); if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - GetRecentlyAddedResponseBody _out = Utils.mapper().readValue( + GetRecentlyAddedLibraryResponseBody _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _res.withObject(Optional.ofNullable(_out)); return _res; } else { @@ -419,9 +392,9 @@ public class Library implements } if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - GetRecentlyAddedBadRequest _out = Utils.mapper().readValue( + GetRecentlyAddedLibraryBadRequest _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -435,9 +408,9 @@ public class Library implements } if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - GetRecentlyAddedUnauthorized _out = Utils.mapper().readValue( + GetRecentlyAddedLibraryUnauthorized _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); + new TypeReference() {}); _out.withRawResponse(Optional.ofNullable(_httpRes)); throw _out; @@ -1505,7 +1478,7 @@ public class Library implements */ public GetSearchLibraryResponse getSearchLibrary( int sectionKey, - QueryParamType type) throws Exception { + GetSearchLibraryQueryParamType type) throws Exception { GetSearchLibraryRequest request = GetSearchLibraryRequest .builder() diff --git a/src/main/java/dev/plexapi/sdk/SDKConfiguration.java b/src/main/java/dev/plexapi/sdk/SDKConfiguration.java index 83ad8a48..6eb66e1e 100644 --- a/src/main/java/dev/plexapi/sdk/SDKConfiguration.java +++ b/src/main/java/dev/plexapi/sdk/SDKConfiguration.java @@ -36,8 +36,8 @@ class SDKConfiguration { } }; private static final String LANGUAGE = "java"; public static final String OPENAPI_DOC_VERSION = "0.0.3"; - public static final String SDK_VERSION = "0.4.1"; - public static final String GEN_VERSION = "2.421.3"; + public static final String SDK_VERSION = "0.5.0"; + public static final String GEN_VERSION = "2.422.22"; 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/errors/GetRecentlyAddedUnauthorized.java b/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedLibraryBadRequest.java similarity index 82% rename from src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedUnauthorized.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedLibraryBadRequest.java index 956b28fa..d069cafa 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedUnauthorized.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedLibraryBadRequest.java @@ -19,9 +19,9 @@ import java.util.Objects; import java.util.Optional; /** - * GetRecentlyAddedUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + * GetRecentlyAddedLibraryBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ -public class GetRecentlyAddedUnauthorized extends RuntimeException { +public class GetRecentlyAddedLibraryBadRequest extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") @@ -35,7 +35,7 @@ public class GetRecentlyAddedUnauthorized extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetRecentlyAddedUnauthorized( + public GetRecentlyAddedLibraryBadRequest( @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); @@ -44,7 +44,7 @@ public class GetRecentlyAddedUnauthorized extends RuntimeException { this.rawResponse = rawResponse; } - public GetRecentlyAddedUnauthorized() { + public GetRecentlyAddedLibraryBadRequest() { this(Optional.empty(), Optional.empty()); } @@ -65,13 +65,13 @@ public class GetRecentlyAddedUnauthorized extends RuntimeException { return new Builder(); } - public GetRecentlyAddedUnauthorized withErrors(List errors) { + public GetRecentlyAddedLibraryBadRequest withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetRecentlyAddedUnauthorized withErrors(Optional> errors) { + public GetRecentlyAddedLibraryBadRequest withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetRecentlyAddedUnauthorized extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetRecentlyAddedUnauthorized withRawResponse(HttpResponse rawResponse) { + public GetRecentlyAddedLibraryBadRequest withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetRecentlyAddedUnauthorized extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetRecentlyAddedUnauthorized withRawResponse(Optional> rawResponse) { + public GetRecentlyAddedLibraryBadRequest withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetRecentlyAddedUnauthorized extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetRecentlyAddedUnauthorized other = (GetRecentlyAddedUnauthorized) o; + GetRecentlyAddedLibraryBadRequest other = (GetRecentlyAddedLibraryBadRequest) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,7 +118,7 @@ public class GetRecentlyAddedUnauthorized extends RuntimeException { @Override public String toString() { - return Utils.toString(GetRecentlyAddedUnauthorized.class, + return Utils.toString(GetRecentlyAddedLibraryBadRequest.class, "errors", errors, "rawResponse", rawResponse); } @@ -163,8 +163,8 @@ public class GetRecentlyAddedUnauthorized extends RuntimeException { return this; } - public GetRecentlyAddedUnauthorized build() { - return new GetRecentlyAddedUnauthorized( + public GetRecentlyAddedLibraryBadRequest build() { + return new GetRecentlyAddedLibraryBadRequest( errors, rawResponse); } diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedErrors.java b/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedLibraryLibraryErrors.java similarity index 83% rename from src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedErrors.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedLibraryLibraryErrors.java index 46cf32d3..b11e99d8 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedErrors.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedLibraryLibraryErrors.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -public class GetRecentlyAddedErrors { +public class GetRecentlyAddedLibraryLibraryErrors { @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") @@ -33,7 +33,7 @@ public class GetRecentlyAddedErrors { private Optional status; @JsonCreator - public GetRecentlyAddedErrors( + public GetRecentlyAddedLibraryLibraryErrors( @JsonProperty("code") Optional code, @JsonProperty("message") Optional message, @JsonProperty("status") Optional status) { @@ -45,7 +45,7 @@ public class GetRecentlyAddedErrors { this.status = status; } - public GetRecentlyAddedErrors() { + public GetRecentlyAddedLibraryLibraryErrors() { this(Optional.empty(), Optional.empty(), Optional.empty()); } @@ -68,37 +68,37 @@ public class GetRecentlyAddedErrors { return new Builder(); } - public GetRecentlyAddedErrors withCode(int code) { + public GetRecentlyAddedLibraryLibraryErrors withCode(int code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); return this; } - public GetRecentlyAddedErrors withCode(Optional code) { + public GetRecentlyAddedLibraryLibraryErrors withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; return this; } - public GetRecentlyAddedErrors withMessage(String message) { + public GetRecentlyAddedLibraryLibraryErrors withMessage(String message) { Utils.checkNotNull(message, "message"); this.message = Optional.ofNullable(message); return this; } - public GetRecentlyAddedErrors withMessage(Optional message) { + public GetRecentlyAddedLibraryLibraryErrors withMessage(Optional message) { Utils.checkNotNull(message, "message"); this.message = message; return this; } - public GetRecentlyAddedErrors withStatus(int status) { + public GetRecentlyAddedLibraryLibraryErrors withStatus(int status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } - public GetRecentlyAddedErrors withStatus(Optional status) { + public GetRecentlyAddedLibraryLibraryErrors withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -112,7 +112,7 @@ public class GetRecentlyAddedErrors { if (o == null || getClass() != o.getClass()) { return false; } - GetRecentlyAddedErrors other = (GetRecentlyAddedErrors) o; + GetRecentlyAddedLibraryLibraryErrors other = (GetRecentlyAddedLibraryLibraryErrors) o; return Objects.deepEquals(this.code, other.code) && Objects.deepEquals(this.message, other.message) && @@ -129,7 +129,7 @@ public class GetRecentlyAddedErrors { @Override public String toString() { - return Utils.toString(GetRecentlyAddedErrors.class, + return Utils.toString(GetRecentlyAddedLibraryLibraryErrors.class, "code", code, "message", message, "status", status); @@ -183,8 +183,8 @@ public class GetRecentlyAddedErrors { return this; } - public GetRecentlyAddedErrors build() { - return new GetRecentlyAddedErrors( + public GetRecentlyAddedLibraryLibraryErrors build() { + return new GetRecentlyAddedLibraryLibraryErrors( code, message, status); diff --git a/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedBadRequest.java b/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedLibraryUnauthorized.java similarity index 73% rename from src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedBadRequest.java rename to src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedLibraryUnauthorized.java index 4d4153f9..df3db41b 100644 --- a/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedBadRequest.java +++ b/src/main/java/dev/plexapi/sdk/models/errors/GetRecentlyAddedLibraryUnauthorized.java @@ -19,13 +19,13 @@ import java.util.Objects; import java.util.Optional; /** - * GetRecentlyAddedBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. + * GetRecentlyAddedLibraryUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -public class GetRecentlyAddedBadRequest extends RuntimeException { +public class GetRecentlyAddedLibraryUnauthorized extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errors") - private Optional> errors; + private Optional> errors; /** * Raw HTTP response; suitable for custom response parsing @@ -35,8 +35,8 @@ public class GetRecentlyAddedBadRequest extends RuntimeException { private Optional> rawResponse; @JsonCreator - public GetRecentlyAddedBadRequest( - @JsonProperty("errors") Optional> errors, + public GetRecentlyAddedLibraryUnauthorized( + @JsonProperty("errors") Optional> errors, @JsonProperty("RawResponse") Optional> rawResponse) { Utils.checkNotNull(errors, "errors"); Utils.checkNotNull(rawResponse, "rawResponse"); @@ -44,13 +44,13 @@ public class GetRecentlyAddedBadRequest extends RuntimeException { this.rawResponse = rawResponse; } - public GetRecentlyAddedBadRequest() { + public GetRecentlyAddedLibraryUnauthorized() { this(Optional.empty(), Optional.empty()); } @SuppressWarnings("unchecked") - public Optional> errors(){ - return (Optional>) errors; + public Optional> errors(){ + return (Optional>) errors; } /** @@ -65,13 +65,13 @@ public class GetRecentlyAddedBadRequest extends RuntimeException { return new Builder(); } - public GetRecentlyAddedBadRequest withErrors(List errors) { + public GetRecentlyAddedLibraryUnauthorized withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public GetRecentlyAddedBadRequest withErrors(Optional> errors) { + public GetRecentlyAddedLibraryUnauthorized withErrors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -80,7 +80,7 @@ public class GetRecentlyAddedBadRequest extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetRecentlyAddedBadRequest withRawResponse(HttpResponse rawResponse) { + public GetRecentlyAddedLibraryUnauthorized withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = Optional.ofNullable(rawResponse); return this; @@ -89,7 +89,7 @@ public class GetRecentlyAddedBadRequest extends RuntimeException { /** * Raw HTTP response; suitable for custom response parsing */ - public GetRecentlyAddedBadRequest withRawResponse(Optional> rawResponse) { + public GetRecentlyAddedLibraryUnauthorized withRawResponse(Optional> rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; @@ -103,7 +103,7 @@ public class GetRecentlyAddedBadRequest extends RuntimeException { if (o == null || getClass() != o.getClass()) { return false; } - GetRecentlyAddedBadRequest other = (GetRecentlyAddedBadRequest) o; + GetRecentlyAddedLibraryUnauthorized other = (GetRecentlyAddedLibraryUnauthorized) o; return Objects.deepEquals(this.errors, other.errors) && Objects.deepEquals(this.rawResponse, other.rawResponse); @@ -118,14 +118,14 @@ public class GetRecentlyAddedBadRequest extends RuntimeException { @Override public String toString() { - return Utils.toString(GetRecentlyAddedBadRequest.class, + return Utils.toString(GetRecentlyAddedLibraryUnauthorized.class, "errors", errors, "rawResponse", rawResponse); } public final static class Builder { - private Optional> errors = Optional.empty(); + private Optional> errors = Optional.empty(); private Optional> rawResponse; @@ -133,13 +133,13 @@ public class GetRecentlyAddedBadRequest extends RuntimeException { // force use of static builder() method } - public Builder errors(List errors) { + public Builder errors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - public Builder errors(Optional> errors) { + public Builder errors(Optional> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -163,8 +163,8 @@ public class GetRecentlyAddedBadRequest extends RuntimeException { return this; } - public GetRecentlyAddedBadRequest build() { - return new GetRecentlyAddedBadRequest( + public GetRecentlyAddedLibraryUnauthorized build() { + return new GetRecentlyAddedLibraryUnauthorized( errors, rawResponse); } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Field.java b/src/main/java/dev/plexapi/sdk/models/operations/Field.java index c88819c4..ad14ca6e 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/Field.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/Field.java @@ -19,17 +19,14 @@ import java.util.Optional; public class Field { - @JsonInclude(Include.NON_ABSENT) @JsonProperty("key") - private Optional key; + private String key; - @JsonInclude(Include.NON_ABSENT) @JsonProperty("title") - private Optional title; + private String title; - @JsonInclude(Include.NON_ABSENT) @JsonProperty("type") - private Optional type; + private String type; @JsonInclude(Include.NON_ABSENT) @JsonProperty("subType") @@ -37,9 +34,9 @@ public class Field { @JsonCreator public Field( - @JsonProperty("key") Optional key, - @JsonProperty("title") Optional title, - @JsonProperty("type") Optional type, + @JsonProperty("key") String key, + @JsonProperty("title") String title, + @JsonProperty("type") String type, @JsonProperty("subType") Optional subType) { Utils.checkNotNull(key, "key"); Utils.checkNotNull(title, "title"); @@ -51,22 +48,25 @@ public class Field { this.subType = subType; } - public Field() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + public Field( + String key, + String title, + String type) { + this(key, title, type, Optional.empty()); } @JsonIgnore - public Optional key() { + public String key() { return key; } @JsonIgnore - public Optional title() { + public String title() { return title; } @JsonIgnore - public Optional type() { + public String type() { return type; } @@ -80,36 +80,18 @@ public class Field { } public Field withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - public Field withKey(Optional key) { Utils.checkNotNull(key, "key"); this.key = key; return this; } public Field withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - public Field withTitle(Optional title) { Utils.checkNotNull(title, "title"); this.title = title; return this; } public Field withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - public Field withType(Optional type) { Utils.checkNotNull(type, "type"); this.type = type; return this; @@ -163,11 +145,11 @@ public class Field { public final static class Builder { - private Optional key = Optional.empty(); + private String key; - private Optional title = Optional.empty(); + private String title; - private Optional type = Optional.empty(); + private String type; private Optional subType = Optional.empty(); @@ -176,36 +158,18 @@ public class Field { } public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - public Builder key(Optional key) { Utils.checkNotNull(key, "key"); this.key = key; return this; } public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - public Builder title(Optional title) { Utils.checkNotNull(title, "title"); this.title = title; return this; } public Builder type(String 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; diff --git a/src/main/java/dev/plexapi/sdk/models/operations/FieldType.java b/src/main/java/dev/plexapi/sdk/models/operations/FieldType.java index e2602c95..6baacd7e 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/FieldType.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/FieldType.java @@ -7,51 +7,40 @@ package dev.plexapi.sdk.models.operations; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; import java.lang.Override; import java.lang.String; -import java.lang.SuppressWarnings; import java.util.List; import java.util.Objects; -import java.util.Optional; public class FieldType { - @JsonInclude(Include.NON_ABSENT) @JsonProperty("type") - private Optional type; + private String type; - @JsonInclude(Include.NON_ABSENT) @JsonProperty("Operator") - private Optional> operator; + private List operator; @JsonCreator public FieldType( - @JsonProperty("type") Optional type, - @JsonProperty("Operator") Optional> operator) { + @JsonProperty("type") String type, + @JsonProperty("Operator") List operator) { Utils.checkNotNull(type, "type"); Utils.checkNotNull(operator, "operator"); this.type = type; this.operator = operator; } - - public FieldType() { - this(Optional.empty(), Optional.empty()); - } @JsonIgnore - public Optional type() { + public String type() { return type; } - @SuppressWarnings("unchecked") @JsonIgnore - public Optional> operator() { - return (Optional>) operator; + public List operator() { + return operator; } public final static Builder builder() { @@ -59,24 +48,12 @@ public class FieldType { } public FieldType withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); - return this; - } - - public FieldType withType(Optional type) { Utils.checkNotNull(type, "type"); this.type = type; return this; } public FieldType withOperator(List operator) { - Utils.checkNotNull(operator, "operator"); - this.operator = Optional.ofNullable(operator); - return this; - } - - public FieldType withOperator(Optional> operator) { Utils.checkNotNull(operator, "operator"); this.operator = operator; return this; @@ -112,33 +89,21 @@ public class FieldType { public final static class Builder { - private Optional type = Optional.empty(); + private String type; - private Optional> operator = Optional.empty(); + private List operator; private Builder() { // force use of static builder() method } public Builder type(String 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 operator(List operator) { - Utils.checkNotNull(operator, "operator"); - this.operator = Optional.ofNullable(operator); - return this; - } - - public Builder operator(Optional> operator) { Utils.checkNotNull(operator, "operator"); this.operator = operator; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetAllLibrariesDirectory.java b/src/main/java/dev/plexapi/sdk/models/operations/GetAllLibrariesDirectory.java index 8c98ab33..6405c5df 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetAllLibrariesDirectory.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetAllLibrariesDirectory.java @@ -83,8 +83,11 @@ public class GetAllLibrariesDirectory { @JsonProperty("directory") private boolean directory; + /** + * Unix epoch datetime in seconds + */ @JsonProperty("contentChangedAt") - private int contentChangedAt; + private long contentChangedAt; @JsonProperty("hidden") private int hidden; @@ -112,7 +115,7 @@ public class GetAllLibrariesDirectory { @JsonProperty("scannedAt") long scannedAt, @JsonProperty("content") boolean content, @JsonProperty("directory") boolean directory, - @JsonProperty("contentChangedAt") int contentChangedAt, + @JsonProperty("contentChangedAt") long contentChangedAt, @JsonProperty("hidden") int hidden, @JsonProperty("Location") List location) { Utils.checkNotNull(allowSync, "allowSync"); @@ -258,8 +261,11 @@ public class GetAllLibrariesDirectory { return directory; } + /** + * Unix epoch datetime in seconds + */ @JsonIgnore - public int contentChangedAt() { + public long contentChangedAt() { return contentChangedAt; } @@ -394,7 +400,10 @@ public class GetAllLibrariesDirectory { return this; } - public GetAllLibrariesDirectory withContentChangedAt(int contentChangedAt) { + /** + * Unix epoch datetime in seconds + */ + public GetAllLibrariesDirectory withContentChangedAt(long contentChangedAt) { Utils.checkNotNull(contentChangedAt, "contentChangedAt"); this.contentChangedAt = contentChangedAt; return this; @@ -535,7 +544,7 @@ public class GetAllLibrariesDirectory { private Boolean directory; - private Integer contentChangedAt; + private Long contentChangedAt; private Integer hidden; @@ -662,7 +671,10 @@ public class GetAllLibrariesDirectory { return this; } - public Builder contentChangedAt(int contentChangedAt) { + /** + * Unix epoch datetime in seconds + */ + public Builder contentChangedAt(long contentChangedAt) { Utils.checkNotNull(contentChangedAt, "contentChangedAt"); this.contentChangedAt = contentChangedAt; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsField.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsField.java new file mode 100644 index 00000000..1e6e0350 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsField.java @@ -0,0 +1,235 @@ +/* + * 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 GetLibraryDetailsField { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("subType") + private Optional subType; + + @JsonCreator + public GetLibraryDetailsField( + @JsonProperty("key") Optional key, + @JsonProperty("title") Optional title, + @JsonProperty("type") Optional 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 GetLibraryDetailsField() { + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional title() { + return title; + } + + @JsonIgnore + public Optional type() { + return type; + } + + @JsonIgnore + public Optional subType() { + return subType; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryDetailsField withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public GetLibraryDetailsField withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetLibraryDetailsField withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public GetLibraryDetailsField withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public GetLibraryDetailsField withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public GetLibraryDetailsField withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetLibraryDetailsField withSubType(String subType) { + Utils.checkNotNull(subType, "subType"); + this.subType = Optional.ofNullable(subType); + return this; + } + + public GetLibraryDetailsField 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; + } + GetLibraryDetailsField other = (GetLibraryDetailsField) 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(GetLibraryDetailsField.class, + "key", key, + "title", title, + "type", type, + "subType", subType); + } + + public final static class Builder { + + private Optional key = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional subType = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder type(String 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 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 GetLibraryDetailsField build() { + return new GetLibraryDetailsField( + key, + title, + type, + subType); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsFieldType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsFieldType.java new file mode 100644 index 00000000..52fa849d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsFieldType.java @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + + +public class GetLibraryDetailsFieldType { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Operator") + private Optional> operator; + + @JsonCreator + public GetLibraryDetailsFieldType( + @JsonProperty("type") Optional type, + @JsonProperty("Operator") Optional> operator) { + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(operator, "operator"); + this.type = type; + this.operator = operator; + } + + public GetLibraryDetailsFieldType() { + this(Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional type() { + return type; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> operator() { + return (Optional>) operator; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryDetailsFieldType withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public GetLibraryDetailsFieldType withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetLibraryDetailsFieldType withOperator(List operator) { + Utils.checkNotNull(operator, "operator"); + this.operator = Optional.ofNullable(operator); + return this; + } + + public GetLibraryDetailsFieldType withOperator(Optional> 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; + } + GetLibraryDetailsFieldType other = (GetLibraryDetailsFieldType) 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(GetLibraryDetailsFieldType.class, + "type", type, + "operator", operator); + } + + public final static class Builder { + + private Optional type = Optional.empty(); + + private Optional> operator = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder type(String 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 operator(List operator) { + Utils.checkNotNull(operator, "operator"); + this.operator = Optional.ofNullable(operator); + return this; + } + + public Builder operator(Optional> operator) { + Utils.checkNotNull(operator, "operator"); + this.operator = operator; + return this; + } + + public GetLibraryDetailsFieldType build() { + return new GetLibraryDetailsFieldType( + type, + operator); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsMediaContainer.java index 7c67f4d7..db3123f4 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsMediaContainer.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsMediaContainer.java @@ -81,7 +81,7 @@ public class GetLibraryDetailsMediaContainer { @JsonInclude(Include.NON_ABSENT) @JsonProperty("FieldType") - private Optional> fieldType; + private Optional> fieldType; @JsonCreator public GetLibraryDetailsMediaContainer( @@ -99,7 +99,7 @@ public class GetLibraryDetailsMediaContainer { @JsonProperty("viewMode") Optional viewMode, @JsonProperty("Directory") Optional> directory, @JsonProperty("Type") Optional> type, - @JsonProperty("FieldType") Optional> fieldType) { + @JsonProperty("FieldType") Optional> fieldType) { Utils.checkNotNull(size, "size"); Utils.checkNotNull(allowSync, "allowSync"); Utils.checkNotNull(art, "art"); @@ -210,8 +210,8 @@ public class GetLibraryDetailsMediaContainer { @SuppressWarnings("unchecked") @JsonIgnore - public Optional> fieldType() { - return (Optional>) fieldType; + public Optional> fieldType() { + return (Optional>) fieldType; } public final static Builder builder() { @@ -386,13 +386,13 @@ public class GetLibraryDetailsMediaContainer { return this; } - public GetLibraryDetailsMediaContainer withFieldType(List fieldType) { + public GetLibraryDetailsMediaContainer withFieldType(List fieldType) { Utils.checkNotNull(fieldType, "fieldType"); this.fieldType = Optional.ofNullable(fieldType); return this; } - public GetLibraryDetailsMediaContainer withFieldType(Optional> fieldType) { + public GetLibraryDetailsMediaContainer withFieldType(Optional> fieldType) { Utils.checkNotNull(fieldType, "fieldType"); this.fieldType = fieldType; return this; @@ -495,7 +495,7 @@ public class GetLibraryDetailsMediaContainer { private Optional> type = Optional.empty(); - private Optional> fieldType = Optional.empty(); + private Optional> fieldType = Optional.empty(); private Builder() { // force use of static builder() method @@ -669,13 +669,13 @@ public class GetLibraryDetailsMediaContainer { 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/GetLibraryDetailsOperator.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsOperator.java new file mode 100644 index 00000000..7fcfa07d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsOperator.java @@ -0,0 +1,151 @@ +/* + * 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 GetLibraryDetailsOperator { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonCreator + public GetLibraryDetailsOperator( + @JsonProperty("key") Optional key, + @JsonProperty("title") Optional title) { + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(title, "title"); + this.key = key; + this.title = title; + } + + public GetLibraryDetailsOperator() { + this(Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional title() { + return title; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryDetailsOperator withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public GetLibraryDetailsOperator withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetLibraryDetailsOperator withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public GetLibraryDetailsOperator withTitle(Optional 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; + } + GetLibraryDetailsOperator other = (GetLibraryDetailsOperator) 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(GetLibraryDetailsOperator.class, + "key", key, + "title", title); + } + + public final static class Builder { + + private Optional key = Optional.empty(); + + private Optional title = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public GetLibraryDetailsOperator build() { + return new GetLibraryDetailsOperator( + key, + title); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsSort.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsSort.java new file mode 100644 index 00000000..fc618ab3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsSort.java @@ -0,0 +1,319 @@ +/* + * 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 GetLibraryDetailsSort { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("default") + private Optional default_; + + @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; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonCreator + public GetLibraryDetailsSort( + @JsonProperty("default") Optional default_, + @JsonProperty("defaultDirection") Optional defaultDirection, + @JsonProperty("descKey") Optional descKey, + @JsonProperty("firstCharacterKey") Optional firstCharacterKey, + @JsonProperty("key") Optional key, + @JsonProperty("title") Optional title) { + Utils.checkNotNull(default_, "default_"); + Utils.checkNotNull(defaultDirection, "defaultDirection"); + Utils.checkNotNull(descKey, "descKey"); + Utils.checkNotNull(firstCharacterKey, "firstCharacterKey"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(title, "title"); + this.default_ = default_; + this.defaultDirection = defaultDirection; + this.descKey = descKey; + this.firstCharacterKey = firstCharacterKey; + this.key = key; + this.title = title; + } + + public GetLibraryDetailsSort() { + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional default_() { + return default_; + } + + @JsonIgnore + public Optional defaultDirection() { + return defaultDirection; + } + + @JsonIgnore + public Optional descKey() { + return descKey; + } + + @JsonIgnore + public Optional firstCharacterKey() { + return firstCharacterKey; + } + + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional title() { + return title; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryDetailsSort withDefault(String default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = Optional.ofNullable(default_); + return this; + } + + public GetLibraryDetailsSort withDefault(Optional default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = default_; + return this; + } + + public GetLibraryDetailsSort withDefaultDirection(String defaultDirection) { + Utils.checkNotNull(defaultDirection, "defaultDirection"); + this.defaultDirection = Optional.ofNullable(defaultDirection); + return this; + } + + public GetLibraryDetailsSort withDefaultDirection(Optional defaultDirection) { + Utils.checkNotNull(defaultDirection, "defaultDirection"); + this.defaultDirection = defaultDirection; + return this; + } + + public GetLibraryDetailsSort withDescKey(String descKey) { + Utils.checkNotNull(descKey, "descKey"); + this.descKey = Optional.ofNullable(descKey); + return this; + } + + public GetLibraryDetailsSort withDescKey(Optional descKey) { + Utils.checkNotNull(descKey, "descKey"); + this.descKey = descKey; + return this; + } + + public GetLibraryDetailsSort withFirstCharacterKey(String firstCharacterKey) { + Utils.checkNotNull(firstCharacterKey, "firstCharacterKey"); + this.firstCharacterKey = Optional.ofNullable(firstCharacterKey); + return this; + } + + public GetLibraryDetailsSort withFirstCharacterKey(Optional firstCharacterKey) { + Utils.checkNotNull(firstCharacterKey, "firstCharacterKey"); + this.firstCharacterKey = firstCharacterKey; + return this; + } + + public GetLibraryDetailsSort withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public GetLibraryDetailsSort withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetLibraryDetailsSort withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public GetLibraryDetailsSort withTitle(Optional 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; + } + GetLibraryDetailsSort other = (GetLibraryDetailsSort) o; + return + Objects.deepEquals(this.default_, other.default_) && + 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_, + defaultDirection, + descKey, + firstCharacterKey, + key, + title); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryDetailsSort.class, + "default_", default_, + "defaultDirection", defaultDirection, + "descKey", descKey, + "firstCharacterKey", firstCharacterKey, + "key", key, + "title", title); + } + + public final static class Builder { + + private Optional default_ = Optional.empty(); + + private Optional defaultDirection = Optional.empty(); + + private Optional descKey = Optional.empty(); + + private Optional firstCharacterKey = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional title = Optional.empty(); + + 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 defaultDirection(String defaultDirection) { + Utils.checkNotNull(defaultDirection, "defaultDirection"); + this.defaultDirection = Optional.ofNullable(defaultDirection); + return this; + } + + 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 = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public GetLibraryDetailsSort build() { + return new GetLibraryDetailsSort( + default_, + defaultDirection, + descKey, + firstCharacterKey, + key, + title); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsType.java index ccc58ac1..e657e2ea 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsType.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryDetailsType.java @@ -44,11 +44,11 @@ public class GetLibraryDetailsType { @JsonInclude(Include.NON_ABSENT) @JsonProperty("Sort") - private Optional> sort; + private Optional> sort; @JsonInclude(Include.NON_ABSENT) @JsonProperty("Field") - private Optional> field; + private Optional> field; @JsonCreator public GetLibraryDetailsType( @@ -57,8 +57,8 @@ public class GetLibraryDetailsType { @JsonProperty("title") Optional title, @JsonProperty("active") Optional active, @JsonProperty("Filter") Optional> filter, - @JsonProperty("Sort") Optional> sort, - @JsonProperty("Field") Optional> field) { + @JsonProperty("Sort") Optional> sort, + @JsonProperty("Field") Optional> field) { Utils.checkNotNull(key, "key"); Utils.checkNotNull(type, "type"); Utils.checkNotNull(title, "title"); @@ -107,14 +107,14 @@ public class GetLibraryDetailsType { @SuppressWarnings("unchecked") @JsonIgnore - public Optional> sort() { - return (Optional>) sort; + public Optional> sort() { + return (Optional>) sort; } @SuppressWarnings("unchecked") @JsonIgnore - public Optional> field() { - return (Optional>) field; + public Optional> field() { + return (Optional>) field; } public final static Builder builder() { @@ -181,25 +181,25 @@ public class GetLibraryDetailsType { return this; } - public GetLibraryDetailsType withSort(List sort) { + public GetLibraryDetailsType withSort(List sort) { Utils.checkNotNull(sort, "sort"); this.sort = Optional.ofNullable(sort); return this; } - public GetLibraryDetailsType withSort(Optional> sort) { + public GetLibraryDetailsType withSort(Optional> sort) { Utils.checkNotNull(sort, "sort"); this.sort = sort; return this; } - public GetLibraryDetailsType withField(List field) { + public GetLibraryDetailsType withField(List field) { Utils.checkNotNull(field, "field"); this.field = Optional.ofNullable(field); return this; } - public GetLibraryDetailsType withField(Optional> field) { + public GetLibraryDetailsType withField(Optional> field) { Utils.checkNotNull(field, "field"); this.field = field; return this; @@ -260,9 +260,9 @@ public class GetLibraryDetailsType { private Optional> filter = Optional.empty(); - private Optional> sort = Optional.empty(); + private Optional> sort = Optional.empty(); - private Optional> field = Optional.empty(); + private Optional> field = Optional.empty(); private Builder() { // force use of static builder() method @@ -328,25 +328,25 @@ public class GetLibraryDetailsType { return this; } - public Builder sort(List sort) { + public Builder sort(List sort) { Utils.checkNotNull(sort, "sort"); this.sort = Optional.ofNullable(sort); return this; } - public Builder sort(Optional> sort) { + public Builder sort(Optional> sort) { Utils.checkNotNull(sort, "sort"); this.sort = sort; return this; } - public Builder field(List field) { + public Builder field(List field) { Utils.checkNotNull(field, "field"); this.field = Optional.ofNullable(field); return this; } - public Builder field(Optional> field) { + public Builder field(Optional> field) { Utils.checkNotNull(field, "field"); this.field = field; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsActiveDirection.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsActiveDirection.java new file mode 100644 index 00000000..2ec497fb --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsActiveDirection.java @@ -0,0 +1,28 @@ +/* + * 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; + +/** + * GetLibraryItemsActiveDirection - The direction of the sort. Can be either `asc` or `desc`. + * + */ +public enum GetLibraryItemsActiveDirection { + Ascending("asc"), + Descending("desc"); + + @JsonValue + private final String value; + + private GetLibraryItemsActiveDirection(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsCollection.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsCollection.java new file mode 100644 index 00000000..87576d11 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsCollection.java @@ -0,0 +1,109 @@ +/* + * 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 GetLibraryItemsCollection { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + @JsonCreator + public GetLibraryItemsCollection( + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + } + + public GetLibraryItemsCollection() { + this(Optional.empty()); + } + + @JsonIgnore + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + 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; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryItemsCollection other = (GetLibraryItemsCollection) o; + return + Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return Objects.hash( + tag); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryItemsCollection.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 GetLibraryItemsCollection build() { + return new GetLibraryItemsCollection( + tag); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsDefaultDirection.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsDefaultDirection.java new file mode 100644 index 00000000..a431751d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsDefaultDirection.java @@ -0,0 +1,28 @@ +/* + * 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; + +/** + * GetLibraryItemsDefaultDirection - The direction of the sort. Can be either `asc` or `desc`. + * + */ +public enum GetLibraryItemsDefaultDirection { + Ascending("asc"), + Descending("desc"); + + @JsonValue + private final String value; + + private GetLibraryItemsDefaultDirection(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsFlattenSeasons.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsFlattenSeasons.java new file mode 100644 index 00000000..6e1a26c5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsFlattenSeasons.java @@ -0,0 +1,24 @@ +/* + * 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; + +public enum GetLibraryItemsFlattenSeasons { + False("0"), + True("1"); + + @JsonValue + private final String value; + + private GetLibraryItemsFlattenSeasons(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsHasThumbnail.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsHasThumbnail.java new file mode 100644 index 00000000..57b26fbe --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsHasThumbnail.java @@ -0,0 +1,24 @@ +/* + * 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; + +public enum GetLibraryItemsHasThumbnail { + False("0"), + True("1"); + + @JsonValue + private final String value; + + private GetLibraryItemsHasThumbnail(String value) { + this.value = value; + } + + public String value() { + return value; + } +} 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 994558f1..6d8e8e67 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsImage.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsImage.java @@ -20,7 +20,7 @@ public class GetLibraryItemsImage { private String alt; @JsonProperty("type") - private GetLibraryItemsLibraryResponseType type; + private GetLibraryItemsLibraryResponse200Type type; @JsonProperty("url") private String url; @@ -28,7 +28,7 @@ public class GetLibraryItemsImage { @JsonCreator public GetLibraryItemsImage( @JsonProperty("alt") String alt, - @JsonProperty("type") GetLibraryItemsLibraryResponseType type, + @JsonProperty("type") GetLibraryItemsLibraryResponse200Type type, @JsonProperty("url") String url) { Utils.checkNotNull(alt, "alt"); Utils.checkNotNull(type, "type"); @@ -44,7 +44,7 @@ public class GetLibraryItemsImage { } @JsonIgnore - public GetLibraryItemsLibraryResponseType type() { + public GetLibraryItemsLibraryResponse200Type type() { return type; } @@ -63,7 +63,7 @@ public class GetLibraryItemsImage { return this; } - public GetLibraryItemsImage withType(GetLibraryItemsLibraryResponseType type) { + public GetLibraryItemsImage withType(GetLibraryItemsLibraryResponse200Type type) { Utils.checkNotNull(type, "type"); this.type = type; return this; @@ -110,7 +110,7 @@ public class GetLibraryItemsImage { private String alt; - private GetLibraryItemsLibraryResponseType type; + private GetLibraryItemsLibraryResponse200Type type; private String url; @@ -124,7 +124,7 @@ public class GetLibraryItemsImage { return this; } - public Builder type(GetLibraryItemsLibraryResponseType type) { + public Builder type(GetLibraryItemsLibraryResponse200Type 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 new file mode 100644 index 00000000..087f35f7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryActiveDirection.java @@ -0,0 +1,28 @@ +/* + * 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; + +/** + * 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; + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryDefaultDirection.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryDefaultDirection.java new file mode 100644 index 00000000..62a6a762 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryDefaultDirection.java @@ -0,0 +1,28 @@ +/* + * 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; + +/** + * 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; + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryField.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryField.java new file mode 100644 index 00000000..69737588 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryField.java @@ -0,0 +1,199 @@ +/* + * 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 new file mode 100644 index 00000000..7b8b334e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryFieldType.java @@ -0,0 +1,119 @@ +/* + * 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 new file mode 100644 index 00000000..8f53f11f --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryFilter.java @@ -0,0 +1,205 @@ +/* + * 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 new file mode 100644 index 00000000..eb6bfd7e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryOperator.java @@ -0,0 +1,118 @@ +/* + * 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/GetLibraryItemsLibraryResponse200Type.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryResponse200Type.java new file mode 100644 index 00000000..b64cf68b --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryResponse200Type.java @@ -0,0 +1,26 @@ +/* + * 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; + +public enum GetLibraryItemsLibraryResponse200Type { + COVER_POSTER("coverPoster"), + BACKGROUND("background"), + SNAPSHOT("snapshot"), + CLEAR_LOGO("clearLogo"); + + @JsonValue + private final String value; + + private GetLibraryItemsLibraryResponse200Type(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 ccd9b3af..cd977a8d 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryResponseType.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryResponseType.java @@ -4,23 +4,316 @@ package dev.plexapi.sdk.models.operations; -import com.fasterxml.jackson.annotation.JsonValue; + +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.List; +import java.util.Objects; +import java.util.Optional; -public enum GetLibraryItemsLibraryResponseType { - COVER_POSTER("coverPoster"), - BACKGROUND("background"), - SNAPSHOT("snapshot"), - CLEAR_LOGO("clearLogo"); - @JsonValue - private final String value; +public class GetLibraryItemsLibraryResponseType { - private GetLibraryItemsLibraryResponseType(String value) { - this.value = value; + @JsonProperty("key") + private String key; + + @JsonProperty("type") + private String type; + + @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 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 String value() { - return value; + public GetLibraryItemsLibraryResponseType( + String key, + String type, + String title, + boolean active) { + this(key, type, title, active, Optional.empty(), Optional.empty(), Optional.empty()); + } + + @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; + } + 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); + } + + @Override + public int hashCode() { + return Objects.hash( + key, + type, + title, + active, + filter, + sort, + field); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryItemsLibraryResponseType.class, + "key", key, + "type", type, + "title", title, + "active", active, + "filter", filter, + "sort", sort, + "field", field); + } + + 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 + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = type; + 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 GetLibraryItemsLibraryResponseType build() { + return new GetLibraryItemsLibraryResponseType( + key, + type, + title, + active, + filter, + sort, + field); + } } } + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibrarySort.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibrarySort.java new file mode 100644 index 00000000..c625c899 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibrarySort.java @@ -0,0 +1,450 @@ +/* + * 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 3c1c2f80..5ad1810a 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryType.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsLibraryType.java @@ -4,316 +4,27 @@ 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 com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.List; -import java.util.Objects; -import java.util.Optional; +/** + * GetLibraryItemsLibraryType - The type of media content + * + */ +public enum GetLibraryItemsLibraryType { + Movie("movie"), + TvShow("show"), + Season("season"), + Episode("episode"); -public class GetLibraryItemsLibraryType { + @JsonValue + private final String value; - @JsonProperty("key") - private String key; - - @JsonProperty("type") - private String type; - - @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 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; + private GetLibraryItemsLibraryType(String value) { + this.value = value; } - public GetLibraryItemsLibraryType( - String key, - String type, - String title, - boolean active) { - this(key, type, title, active, Optional.empty(), Optional.empty(), Optional.empty()); - } - - @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); - } - - @Override - public int hashCode() { - return Objects.hash( - key, - type, - title, - active, - filter, - sort, - field); - } - - @Override - public String toString() { - return Utils.toString(GetLibraryItemsLibraryType.class, - "key", key, - "type", type, - "title", title, - "active", active, - "filter", filter, - "sort", sort, - "field", field); - } - - 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 - } - - public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = key; - return this; - } - - public Builder type(String type) { - Utils.checkNotNull(type, "type"); - this.type = type; - 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 GetLibraryItemsLibraryType build() { - return new GetLibraryItemsLibraryType( - key, - type, - title, - active, - filter, - sort, - field); - } + public String value() { + return value; } } - 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 16e7b67c..6d9e7134 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMedia.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMedia.java @@ -10,12 +10,15 @@ 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.Integer; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; import java.util.List; import java.util.Objects; import java.util.Optional; @@ -70,6 +73,14 @@ public class GetLibraryItemsMedia { @JsonProperty("hasVoiceActivity") private Optional hasVoiceActivity; + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("optimizedForStreaming") + private Optional optimizedForStreaming; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("has64bitOffsets") + private Optional has64bitOffsets; + @JsonProperty("Part") private List part; @@ -90,6 +101,8 @@ public class GetLibraryItemsMedia { @JsonProperty("videoFrameRate") String videoFrameRate, @JsonProperty("videoProfile") String videoProfile, @JsonProperty("hasVoiceActivity") Optional hasVoiceActivity, + @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, + @JsonProperty("has64bitOffsets") Optional has64bitOffsets, @JsonProperty("Part") List part) { Utils.checkNotNull(id, "id"); Utils.checkNotNull(duration, "duration"); @@ -106,6 +119,8 @@ public class GetLibraryItemsMedia { Utils.checkNotNull(videoFrameRate, "videoFrameRate"); Utils.checkNotNull(videoProfile, "videoProfile"); Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); Utils.checkNotNull(part, "part"); this.id = id; this.duration = duration; @@ -122,6 +137,8 @@ public class GetLibraryItemsMedia { this.videoFrameRate = videoFrameRate; this.videoProfile = videoProfile; this.hasVoiceActivity = hasVoiceActivity; + this.optimizedForStreaming = optimizedForStreaming; + this.has64bitOffsets = has64bitOffsets; this.part = part; } @@ -140,7 +157,7 @@ public class GetLibraryItemsMedia { String videoFrameRate, String videoProfile, List part) { - this(id, duration, bitrate, width, height, aspectRatio, Optional.empty(), audioChannels, audioCodec, videoCodec, videoResolution, container, videoFrameRate, videoProfile, Optional.empty(), part); + this(id, duration, bitrate, width, height, aspectRatio, Optional.empty(), audioChannels, audioCodec, videoCodec, videoResolution, container, videoFrameRate, videoProfile, Optional.empty(), Optional.empty(), Optional.empty(), part); } @JsonIgnore @@ -218,6 +235,17 @@ public class GetLibraryItemsMedia { return hasVoiceActivity; } + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional optimizedForStreaming() { + return (Optional) optimizedForStreaming; + } + + @JsonIgnore + public Optional has64bitOffsets() { + return has64bitOffsets; + } + @JsonIgnore public List part() { return part; @@ -329,6 +357,30 @@ public class GetLibraryItemsMedia { return this; } + public GetLibraryItemsMedia withOptimizedForStreaming(GetLibraryItemsOptimizedForStreaming optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); + return this; + } + + public GetLibraryItemsMedia withOptimizedForStreaming(Optional optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = optimizedForStreaming; + return this; + } + + public GetLibraryItemsMedia withHas64bitOffsets(boolean has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); + return this; + } + + public GetLibraryItemsMedia withHas64bitOffsets(Optional has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = has64bitOffsets; + return this; + } + public GetLibraryItemsMedia withPart(List part) { Utils.checkNotNull(part, "part"); this.part = part; @@ -360,6 +412,8 @@ public class GetLibraryItemsMedia { Objects.deepEquals(this.videoFrameRate, other.videoFrameRate) && Objects.deepEquals(this.videoProfile, other.videoProfile) && Objects.deepEquals(this.hasVoiceActivity, other.hasVoiceActivity) && + Objects.deepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && + Objects.deepEquals(this.has64bitOffsets, other.has64bitOffsets) && Objects.deepEquals(this.part, other.part); } @@ -381,6 +435,8 @@ public class GetLibraryItemsMedia { videoFrameRate, videoProfile, hasVoiceActivity, + optimizedForStreaming, + has64bitOffsets, part); } @@ -402,6 +458,8 @@ public class GetLibraryItemsMedia { "videoFrameRate", videoFrameRate, "videoProfile", videoProfile, "hasVoiceActivity", hasVoiceActivity, + "optimizedForStreaming", optimizedForStreaming, + "has64bitOffsets", has64bitOffsets, "part", part); } @@ -437,6 +495,10 @@ public class GetLibraryItemsMedia { private Optional hasVoiceActivity = Optional.empty(); + private Optional optimizedForStreaming; + + private Optional has64bitOffsets = Optional.empty(); + private List part; private Builder() { @@ -545,6 +607,30 @@ public class GetLibraryItemsMedia { return this; } + public Builder optimizedForStreaming(GetLibraryItemsOptimizedForStreaming optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); + return this; + } + + public Builder optimizedForStreaming(Optional optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = optimizedForStreaming; + return this; + } + + public Builder has64bitOffsets(boolean has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); + return this; + } + + public Builder has64bitOffsets(Optional has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = has64bitOffsets; + return this; + } + public Builder part(List part) { Utils.checkNotNull(part, "part"); this.part = part; @@ -552,7 +638,9 @@ public class GetLibraryItemsMedia { } public GetLibraryItemsMedia build() { - return new GetLibraryItemsMedia( + if (optimizedForStreaming == null) { + optimizedForStreaming = _SINGLETON_VALUE_OptimizedForStreaming.value(); + } return new GetLibraryItemsMedia( id, duration, bitrate, @@ -568,8 +656,16 @@ public class GetLibraryItemsMedia { videoFrameRate, videoProfile, hasVoiceActivity, + 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 2d664b10..7b889c07 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMediaContainer.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMediaContainer.java @@ -13,6 +13,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; import java.lang.Boolean; import java.lang.Integer; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; @@ -20,9 +21,21 @@ 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; + @JsonProperty("size") private int size; @@ -49,7 +62,7 @@ public class GetLibraryItemsMediaContainer { private String identifier; @JsonProperty("librarySectionID") - private LibrarySectionID librarySectionID; + private long librarySectionID; @JsonProperty("librarySectionTitle") private String librarySectionTitle; @@ -92,10 +105,12 @@ public class GetLibraryItemsMediaContainer { */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("Meta") - private Optional meta; + private Optional meta; @JsonCreator public GetLibraryItemsMediaContainer( + @JsonProperty("Type") Optional> type, + @JsonProperty("FieldType") Optional> fieldType, @JsonProperty("size") int size, @JsonProperty("totalSize") int totalSize, @JsonProperty("offset") int offset, @@ -104,7 +119,7 @@ public class GetLibraryItemsMediaContainer { @JsonProperty("nocache") Optional nocache, @JsonProperty("art") String art, @JsonProperty("identifier") String identifier, - @JsonProperty("librarySectionID") LibrarySectionID librarySectionID, + @JsonProperty("librarySectionID") long librarySectionID, @JsonProperty("librarySectionTitle") String librarySectionTitle, @JsonProperty("librarySectionUUID") String librarySectionUUID, @JsonProperty("mediaTagPrefix") String mediaTagPrefix, @@ -116,7 +131,9 @@ public class GetLibraryItemsMediaContainer { @JsonProperty("viewMode") Optional viewMode, @JsonProperty("mixedParents") Optional mixedParents, @JsonProperty("Metadata") List metadata, - @JsonProperty("Meta") Optional meta) { + @JsonProperty("Meta") Optional meta) { + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(fieldType, "fieldType"); Utils.checkNotNull(size, "size"); Utils.checkNotNull(totalSize, "totalSize"); Utils.checkNotNull(offset, "offset"); @@ -138,6 +155,8 @@ 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; @@ -169,7 +188,7 @@ public class GetLibraryItemsMediaContainer { boolean allowSync, String art, String identifier, - LibrarySectionID librarySectionID, + long librarySectionID, String librarySectionTitle, String librarySectionUUID, String mediaTagPrefix, @@ -179,7 +198,19 @@ public class GetLibraryItemsMediaContainer { String title2, String viewGroup, List metadata) { - this(size, totalSize, offset, content, allowSync, Optional.empty(), art, identifier, librarySectionID, librarySectionTitle, librarySectionUUID, mediaTagPrefix, mediaTagVersion, thumb, title1, title2, viewGroup, Optional.empty(), Optional.empty(), metadata, Optional.empty()); + 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(), metadata, Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> type() { + return (Optional>) type; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> fieldType() { + return (Optional>) fieldType; } @JsonIgnore @@ -223,7 +254,7 @@ public class GetLibraryItemsMediaContainer { } @JsonIgnore - public LibrarySectionID librarySectionID() { + public long librarySectionID() { return librarySectionID; } @@ -288,14 +319,38 @@ public class GetLibraryItemsMediaContainer { */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional meta() { - return (Optional) meta; + public Optional meta() { + return (Optional) meta; } public final static Builder builder() { 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; + } + public GetLibraryItemsMediaContainer withSize(int size) { Utils.checkNotNull(size, "size"); this.size = size; @@ -350,7 +405,7 @@ public class GetLibraryItemsMediaContainer { return this; } - public GetLibraryItemsMediaContainer withLibrarySectionID(LibrarySectionID librarySectionID) { + public GetLibraryItemsMediaContainer withLibrarySectionID(long librarySectionID) { Utils.checkNotNull(librarySectionID, "librarySectionID"); this.librarySectionID = librarySectionID; return this; @@ -438,7 +493,7 @@ public class GetLibraryItemsMediaContainer { * The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. * */ - public GetLibraryItemsMediaContainer withMeta(Meta meta) { + public GetLibraryItemsMediaContainer withMeta(GetLibraryItemsMeta meta) { Utils.checkNotNull(meta, "meta"); this.meta = Optional.ofNullable(meta); return this; @@ -448,7 +503,7 @@ public class GetLibraryItemsMediaContainer { * The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. * */ - public GetLibraryItemsMediaContainer withMeta(Optional meta) { + public GetLibraryItemsMediaContainer withMeta(Optional meta) { Utils.checkNotNull(meta, "meta"); this.meta = meta; return this; @@ -464,6 +519,8 @@ 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) && @@ -490,6 +547,8 @@ public class GetLibraryItemsMediaContainer { @Override public int hashCode() { return Objects.hash( + type, + fieldType, size, totalSize, offset, @@ -516,6 +575,8 @@ public class GetLibraryItemsMediaContainer { @Override public String toString() { return Utils.toString(GetLibraryItemsMediaContainer.class, + "type", type, + "fieldType", fieldType, "size", size, "totalSize", totalSize, "offset", offset, @@ -541,6 +602,10 @@ public class GetLibraryItemsMediaContainer { public final static class Builder { + private Optional> type = Optional.empty(); + + private Optional> fieldType = Optional.empty(); + private Integer size; private Integer totalSize; @@ -557,7 +622,7 @@ public class GetLibraryItemsMediaContainer { private String identifier; - private LibrarySectionID librarySectionID; + private Long librarySectionID; private String librarySectionTitle; @@ -581,12 +646,36 @@ public class GetLibraryItemsMediaContainer { private List metadata; - private Optional meta = Optional.empty(); + private Optional meta = Optional.empty(); private Builder() { // 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; + } + public Builder size(int size) { Utils.checkNotNull(size, "size"); this.size = size; @@ -641,7 +730,7 @@ public class GetLibraryItemsMediaContainer { return this; } - public Builder librarySectionID(LibrarySectionID librarySectionID) { + public Builder librarySectionID(long librarySectionID) { Utils.checkNotNull(librarySectionID, "librarySectionID"); this.librarySectionID = librarySectionID; return this; @@ -729,7 +818,7 @@ public class GetLibraryItemsMediaContainer { * The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. * */ - public Builder meta(Meta meta) { + public Builder meta(GetLibraryItemsMeta meta) { Utils.checkNotNull(meta, "meta"); this.meta = Optional.ofNullable(meta); return this; @@ -739,7 +828,7 @@ public class GetLibraryItemsMediaContainer { * The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. * */ - public Builder meta(Optional meta) { + public Builder meta(Optional meta) { Utils.checkNotNull(meta, "meta"); this.meta = meta; return this; @@ -747,6 +836,8 @@ 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/GetLibraryItemsMediaGuid.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMediaGuid.java new file mode 100644 index 00000000..23c02e43 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMediaGuid.java @@ -0,0 +1,109 @@ +/* + * 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 GetLibraryItemsMediaGuid { + + /** + * Can be one of the following formats: + * imdb://tt13015952, tmdb://2434012, tvdb://7945991 + * + */ + @JsonProperty("id") + private String id; + + @JsonCreator + public GetLibraryItemsMediaGuid( + @JsonProperty("id") String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + } + + /** + * Can be one of the following formats: + * imdb://tt13015952, tmdb://2434012, tvdb://7945991 + * + */ + @JsonIgnore + public String id() { + return id; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Can be one of the following formats: + * imdb://tt13015952, tmdb://2434012, tvdb://7945991 + * + */ + public GetLibraryItemsMediaGuid withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryItemsMediaGuid other = (GetLibraryItemsMediaGuid) o; + return + Objects.deepEquals(this.id, other.id); + } + + @Override + public int hashCode() { + return Objects.hash( + id); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryItemsMediaGuid.class, + "id", id); + } + + public final static class Builder { + + private String id; + + private Builder() { + // force use of static builder() method + } + + /** + * Can be one of the following formats: + * imdb://tt13015952, tmdb://2434012, tvdb://7945991 + * + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetLibraryItemsMediaGuid build() { + return new GetLibraryItemsMediaGuid( + id); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMeta.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMeta.java new file mode 100644 index 00000000..d6de8270 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMeta.java @@ -0,0 +1,159 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetLibraryItemsMeta - The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. + * + */ + +public class GetLibraryItemsMeta { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Type") + private Optional> type; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("FieldType") + private Optional> fieldType; + + @JsonCreator + public GetLibraryItemsMeta( + @JsonProperty("Type") Optional> type, + @JsonProperty("FieldType") Optional> fieldType) { + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(fieldType, "fieldType"); + this.type = type; + this.fieldType = fieldType; + } + + public GetLibraryItemsMeta() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> type() { + return (Optional>) type; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> fieldType() { + return (Optional>) fieldType; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryItemsMeta withType(List type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public GetLibraryItemsMeta withType(Optional> type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetLibraryItemsMeta withFieldType(List fieldType) { + Utils.checkNotNull(fieldType, "fieldType"); + this.fieldType = Optional.ofNullable(fieldType); + return this; + } + + public GetLibraryItemsMeta withFieldType(Optional> fieldType) { + Utils.checkNotNull(fieldType, "fieldType"); + this.fieldType = fieldType; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryItemsMeta other = (GetLibraryItemsMeta) o; + return + Objects.deepEquals(this.type, other.type) && + Objects.deepEquals(this.fieldType, other.fieldType); + } + + @Override + public int hashCode() { + return Objects.hash( + type, + fieldType); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryItemsMeta.class, + "type", type, + "fieldType", fieldType); + } + + public final static class Builder { + + private Optional> type = Optional.empty(); + + private Optional> fieldType = Optional.empty(); + + private Builder() { + // 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; + } + + public GetLibraryItemsMeta build() { + return new GetLibraryItemsMeta( + type, + fieldType); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMetaDataRating.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMetaDataRating.java new file mode 100644 index 00000000..74c74a5e --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMetaDataRating.java @@ -0,0 +1,184 @@ +/* + * 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 GetLibraryItemsMetaDataRating { + + /** + * 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 GetLibraryItemsMetaDataRating( + @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 GetLibraryItemsMetaDataRating withImage(String image) { + Utils.checkNotNull(image, "image"); + this.image = image; + return this; + } + + /** + * The value of the rating. + */ + public GetLibraryItemsMetaDataRating withValue(float value) { + Utils.checkNotNull(value, "value"); + this.value = value; + return this; + } + + /** + * The type of rating (e.g., audience, critic). + */ + public GetLibraryItemsMetaDataRating 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; + } + GetLibraryItemsMetaDataRating other = (GetLibraryItemsMetaDataRating) 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(GetLibraryItemsMetaDataRating.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 GetLibraryItemsMetaDataRating build() { + return new GetLibraryItemsMetaDataRating( + image, + value, + type); + } + } +} + 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 a15aef70..daf1f24b 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMetadata.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsMetadata.java @@ -50,12 +50,24 @@ public class GetLibraryItemsMetadata { @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 * */ @JsonProperty("type") - private GetLibraryItemsType type; + private GetLibraryItemsLibraryType type; @JsonProperty("title") private String title; @@ -93,7 +105,7 @@ public class GetLibraryItemsMetadata { @JsonInclude(Include.NON_ABSENT) @JsonProperty("flattenSeasons") - private Optional flattenSeasons; + private Optional flattenSeasons; /** * Setting that indicates the episode ordering for the show @@ -106,7 +118,7 @@ public class GetLibraryItemsMetadata { */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("showOrdering") - private Optional showOrdering; + private Optional showOrdering; @JsonInclude(Include.NON_ABSENT) @JsonProperty("thumb") @@ -177,6 +189,10 @@ public class GetLibraryItemsMetadata { @JsonProperty("grandparentThumb") private Optional grandparentThumb; + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentSlug") + private Optional parentSlug; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("grandparentSlug") private Optional grandparentSlug; @@ -215,7 +231,7 @@ public class GetLibraryItemsMetadata { @JsonInclude(Include.NON_ABSENT) @JsonProperty("Collection") - private Optional> collection; + private Optional> collection; @JsonInclude(Include.NON_ABSENT) @JsonProperty("Role") @@ -227,11 +243,15 @@ public class GetLibraryItemsMetadata { */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("Guid") - private Optional> mediaGuid; + private Optional> mediaGuid; @JsonInclude(Include.NON_ABSENT) @JsonProperty("UltraBlurColors") - private Optional ultraBlurColors; + private Optional ultraBlurColors; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Rating") + private Optional> metaDataRating; @JsonInclude(Include.NON_ABSENT) @JsonProperty("Image") @@ -336,7 +356,10 @@ public class GetLibraryItemsMetadata { @JsonProperty("guid") String guid, @JsonProperty("studio") Optional studio, @JsonProperty("skipChildren") Optional skipChildren, - @JsonProperty("type") GetLibraryItemsType type, + @JsonProperty("librarySectionID") Optional librarySectionID, + @JsonProperty("librarySectionTitle") Optional librarySectionTitle, + @JsonProperty("librarySectionKey") Optional librarySectionKey, + @JsonProperty("type") GetLibraryItemsLibraryType type, @JsonProperty("title") String title, @JsonProperty("slug") Optional slug, @JsonProperty("contentRating") Optional contentRating, @@ -346,8 +369,8 @@ public class GetLibraryItemsMetadata { @JsonProperty("year") Optional year, @JsonProperty("seasonCount") Optional seasonCount, @JsonProperty("tagline") Optional tagline, - @JsonProperty("flattenSeasons") Optional flattenSeasons, - @JsonProperty("showOrdering") Optional showOrdering, + @JsonProperty("flattenSeasons") Optional flattenSeasons, + @JsonProperty("showOrdering") Optional showOrdering, @JsonProperty("thumb") Optional thumb, @JsonProperty("art") Optional art, @JsonProperty("banner") Optional banner, @@ -364,6 +387,7 @@ public class GetLibraryItemsMetadata { @JsonProperty("grandparentKey") Optional grandparentKey, @JsonProperty("grandparentTitle") Optional grandparentTitle, @JsonProperty("grandparentThumb") Optional grandparentThumb, + @JsonProperty("parentSlug") Optional parentSlug, @JsonProperty("grandparentSlug") Optional grandparentSlug, @JsonProperty("grandparentArt") Optional grandparentArt, @JsonProperty("grandparentTheme") Optional grandparentTheme, @@ -372,10 +396,11 @@ public class GetLibraryItemsMetadata { @JsonProperty("Country") Optional> country, @JsonProperty("Director") Optional> director, @JsonProperty("Writer") Optional> writer, - @JsonProperty("Collection") Optional> collection, + @JsonProperty("Collection") Optional> collection, @JsonProperty("Role") Optional> role, - @JsonProperty("Guid") Optional> mediaGuid, - @JsonProperty("UltraBlurColors") Optional ultraBlurColors, + @JsonProperty("Guid") Optional> mediaGuid, + @JsonProperty("UltraBlurColors") Optional ultraBlurColors, + @JsonProperty("Rating") Optional> metaDataRating, @JsonProperty("Image") Optional> image, @JsonProperty("titleSort") Optional titleSort, @JsonProperty("viewCount") Optional viewCount, @@ -404,6 +429,9 @@ public class GetLibraryItemsMetadata { Utils.checkNotNull(guid, "guid"); 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"); @@ -432,6 +460,7 @@ public class GetLibraryItemsMetadata { Utils.checkNotNull(grandparentKey, "grandparentKey"); Utils.checkNotNull(grandparentTitle, "grandparentTitle"); Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + Utils.checkNotNull(parentSlug, "parentSlug"); Utils.checkNotNull(grandparentSlug, "grandparentSlug"); Utils.checkNotNull(grandparentArt, "grandparentArt"); Utils.checkNotNull(grandparentTheme, "grandparentTheme"); @@ -444,6 +473,7 @@ public class GetLibraryItemsMetadata { Utils.checkNotNull(role, "role"); Utils.checkNotNull(mediaGuid, "mediaGuid"); Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); + Utils.checkNotNull(metaDataRating, "metaDataRating"); Utils.checkNotNull(image, "image"); Utils.checkNotNull(titleSort, "titleSort"); Utils.checkNotNull(viewCount, "viewCount"); @@ -472,6 +502,9 @@ public class GetLibraryItemsMetadata { this.guid = guid; this.studio = studio; this.skipChildren = skipChildren; + this.librarySectionID = librarySectionID; + this.librarySectionTitle = librarySectionTitle; + this.librarySectionKey = librarySectionKey; this.type = type; this.title = title; this.slug = slug; @@ -500,6 +533,7 @@ public class GetLibraryItemsMetadata { this.grandparentKey = grandparentKey; this.grandparentTitle = grandparentTitle; this.grandparentThumb = grandparentThumb; + this.parentSlug = parentSlug; this.grandparentSlug = grandparentSlug; this.grandparentArt = grandparentArt; this.grandparentTheme = grandparentTheme; @@ -512,6 +546,7 @@ public class GetLibraryItemsMetadata { this.role = role; this.mediaGuid = mediaGuid; this.ultraBlurColors = ultraBlurColors; + this.metaDataRating = metaDataRating; this.image = image; this.titleSort = titleSort; this.viewCount = viewCount; @@ -541,11 +576,11 @@ public class GetLibraryItemsMetadata { String ratingKey, String key, String guid, - GetLibraryItemsType type, + GetLibraryItemsLibraryType type, String title, String summary, long addedAt) { - this(ratingKey, key, guid, 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(), 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()); + 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(), 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()); } /** @@ -578,12 +613,27 @@ public class GetLibraryItemsMetadata { 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 * */ @JsonIgnore - public GetLibraryItemsType type() { + public GetLibraryItemsLibraryType type() { return type; } @@ -634,8 +684,8 @@ public class GetLibraryItemsMetadata { @SuppressWarnings("unchecked") @JsonIgnore - public Optional flattenSeasons() { - return (Optional) flattenSeasons; + public Optional flattenSeasons() { + return (Optional) flattenSeasons; } /** @@ -649,8 +699,8 @@ public class GetLibraryItemsMetadata { */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional showOrdering() { - return (Optional) showOrdering; + public Optional showOrdering() { + return (Optional) showOrdering; } @JsonIgnore @@ -739,6 +789,11 @@ public class GetLibraryItemsMetadata { return grandparentThumb; } + @JsonIgnore + public Optional parentSlug() { + return parentSlug; + } + @JsonIgnore public Optional grandparentSlug() { return grandparentSlug; @@ -790,8 +845,8 @@ public class GetLibraryItemsMetadata { @SuppressWarnings("unchecked") @JsonIgnore - public Optional> collection() { - return (Optional>) collection; + public Optional> collection() { + return (Optional>) collection; } @SuppressWarnings("unchecked") @@ -806,14 +861,20 @@ public class GetLibraryItemsMetadata { */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional> mediaGuid() { - return (Optional>) mediaGuid; + public Optional> mediaGuid() { + return (Optional>) mediaGuid; } @SuppressWarnings("unchecked") @JsonIgnore - public Optional ultraBlurColors() { - return (Optional) ultraBlurColors; + public Optional ultraBlurColors() { + return (Optional) ultraBlurColors; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> metaDataRating() { + return (Optional>) metaDataRating; } @SuppressWarnings("unchecked") @@ -987,11 +1048,47 @@ public class GetLibraryItemsMetadata { 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 * */ - public GetLibraryItemsMetadata withType(GetLibraryItemsType type) { + public GetLibraryItemsMetadata withType(GetLibraryItemsLibraryType type) { Utils.checkNotNull(type, "type"); this.type = type; return this; @@ -1093,13 +1190,13 @@ public class GetLibraryItemsMetadata { return this; } - public GetLibraryItemsMetadata withFlattenSeasons(FlattenSeasons flattenSeasons) { + public GetLibraryItemsMetadata withFlattenSeasons(GetLibraryItemsFlattenSeasons flattenSeasons) { Utils.checkNotNull(flattenSeasons, "flattenSeasons"); this.flattenSeasons = Optional.ofNullable(flattenSeasons); return this; } - public GetLibraryItemsMetadata withFlattenSeasons(Optional flattenSeasons) { + public GetLibraryItemsMetadata withFlattenSeasons(Optional flattenSeasons) { Utils.checkNotNull(flattenSeasons, "flattenSeasons"); this.flattenSeasons = flattenSeasons; return this; @@ -1114,7 +1211,7 @@ public class GetLibraryItemsMetadata { * absolute = TheTVDB (Absolute)). * */ - public GetLibraryItemsMetadata withShowOrdering(ShowOrdering showOrdering) { + public GetLibraryItemsMetadata withShowOrdering(GetLibraryItemsShowOrdering showOrdering) { Utils.checkNotNull(showOrdering, "showOrdering"); this.showOrdering = Optional.ofNullable(showOrdering); return this; @@ -1129,7 +1226,7 @@ public class GetLibraryItemsMetadata { * absolute = TheTVDB (Absolute)). * */ - public GetLibraryItemsMetadata withShowOrdering(Optional showOrdering) { + public GetLibraryItemsMetadata withShowOrdering(Optional showOrdering) { Utils.checkNotNull(showOrdering, "showOrdering"); this.showOrdering = showOrdering; return this; @@ -1330,6 +1427,18 @@ public class GetLibraryItemsMetadata { 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; + } + public GetLibraryItemsMetadata withGrandparentSlug(String grandparentSlug) { Utils.checkNotNull(grandparentSlug, "grandparentSlug"); this.grandparentSlug = Optional.ofNullable(grandparentSlug); @@ -1434,13 +1543,13 @@ public class GetLibraryItemsMetadata { return this; } - public GetLibraryItemsMetadata withCollection(List collection) { + public GetLibraryItemsMetadata withCollection(List collection) { Utils.checkNotNull(collection, "collection"); this.collection = Optional.ofNullable(collection); return this; } - public GetLibraryItemsMetadata withCollection(Optional> collection) { + public GetLibraryItemsMetadata withCollection(Optional> collection) { Utils.checkNotNull(collection, "collection"); this.collection = collection; return this; @@ -1462,7 +1571,7 @@ public class GetLibraryItemsMetadata { * The Guid object is only included in the response if the `includeGuids` parameter is set to `1`. * */ - public GetLibraryItemsMetadata withMediaGuid(List mediaGuid) { + public GetLibraryItemsMetadata withMediaGuid(List mediaGuid) { Utils.checkNotNull(mediaGuid, "mediaGuid"); this.mediaGuid = Optional.ofNullable(mediaGuid); return this; @@ -1472,24 +1581,36 @@ public class GetLibraryItemsMetadata { * The Guid object is only included in the response if the `includeGuids` parameter is set to `1`. * */ - public GetLibraryItemsMetadata withMediaGuid(Optional> mediaGuid) { + public GetLibraryItemsMetadata withMediaGuid(Optional> mediaGuid) { Utils.checkNotNull(mediaGuid, "mediaGuid"); this.mediaGuid = mediaGuid; return this; } - public GetLibraryItemsMetadata withUltraBlurColors(UltraBlurColors ultraBlurColors) { + public GetLibraryItemsMetadata withUltraBlurColors(GetLibraryItemsUltraBlurColors ultraBlurColors) { Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); this.ultraBlurColors = Optional.ofNullable(ultraBlurColors); return this; } - public GetLibraryItemsMetadata withUltraBlurColors(Optional ultraBlurColors) { + public GetLibraryItemsMetadata withUltraBlurColors(Optional ultraBlurColors) { Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); this.ultraBlurColors = ultraBlurColors; return this; } + public GetLibraryItemsMetadata withMetaDataRating(List metaDataRating) { + Utils.checkNotNull(metaDataRating, "metaDataRating"); + this.metaDataRating = Optional.ofNullable(metaDataRating); + 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); @@ -1789,6 +1910,9 @@ public class GetLibraryItemsMetadata { Objects.deepEquals(this.guid, other.guid) && 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) && @@ -1817,6 +1941,7 @@ public class GetLibraryItemsMetadata { Objects.deepEquals(this.grandparentKey, other.grandparentKey) && 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) && @@ -1829,6 +1954,7 @@ public class GetLibraryItemsMetadata { Objects.deepEquals(this.role, other.role) && 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) && @@ -1862,6 +1988,9 @@ public class GetLibraryItemsMetadata { guid, studio, skipChildren, + librarySectionID, + librarySectionTitle, + librarySectionKey, type, title, slug, @@ -1890,6 +2019,7 @@ public class GetLibraryItemsMetadata { grandparentKey, grandparentTitle, grandparentThumb, + parentSlug, grandparentSlug, grandparentArt, grandparentTheme, @@ -1902,6 +2032,7 @@ public class GetLibraryItemsMetadata { role, mediaGuid, ultraBlurColors, + metaDataRating, image, titleSort, viewCount, @@ -1935,6 +2066,9 @@ public class GetLibraryItemsMetadata { "guid", guid, "studio", studio, "skipChildren", skipChildren, + "librarySectionID", librarySectionID, + "librarySectionTitle", librarySectionTitle, + "librarySectionKey", librarySectionKey, "type", type, "title", title, "slug", slug, @@ -1963,6 +2097,7 @@ public class GetLibraryItemsMetadata { "grandparentKey", grandparentKey, "grandparentTitle", grandparentTitle, "grandparentThumb", grandparentThumb, + "parentSlug", parentSlug, "grandparentSlug", grandparentSlug, "grandparentArt", grandparentArt, "grandparentTheme", grandparentTheme, @@ -1975,6 +2110,7 @@ public class GetLibraryItemsMetadata { "role", role, "mediaGuid", mediaGuid, "ultraBlurColors", ultraBlurColors, + "metaDataRating", metaDataRating, "image", image, "titleSort", titleSort, "viewCount", viewCount, @@ -2012,7 +2148,13 @@ public class GetLibraryItemsMetadata { private Optional skipChildren = Optional.empty(); - private GetLibraryItemsType type; + private Optional librarySectionID = Optional.empty(); + + private Optional librarySectionTitle = Optional.empty(); + + private Optional librarySectionKey = Optional.empty(); + + private GetLibraryItemsLibraryType type; private String title; @@ -2032,9 +2174,9 @@ public class GetLibraryItemsMetadata { private Optional tagline = Optional.empty(); - private Optional flattenSeasons; + private Optional flattenSeasons; - private Optional showOrdering = Optional.empty(); + private Optional showOrdering = Optional.empty(); private Optional thumb = Optional.empty(); @@ -2068,6 +2210,8 @@ public class GetLibraryItemsMetadata { private Optional grandparentThumb = Optional.empty(); + private Optional parentSlug = Optional.empty(); + private Optional grandparentSlug = Optional.empty(); private Optional grandparentArt = Optional.empty(); @@ -2084,13 +2228,15 @@ public class GetLibraryItemsMetadata { private Optional> writer = Optional.empty(); - private Optional> collection = Optional.empty(); + private Optional> collection = Optional.empty(); private Optional> role = Optional.empty(); - private Optional> mediaGuid = Optional.empty(); + private Optional> mediaGuid = Optional.empty(); - private Optional ultraBlurColors = Optional.empty(); + private Optional ultraBlurColors = Optional.empty(); + + private Optional> metaDataRating = Optional.empty(); private Optional> image = Optional.empty(); @@ -2189,11 +2335,47 @@ public class GetLibraryItemsMetadata { 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 * */ - public Builder type(GetLibraryItemsType type) { + public Builder type(GetLibraryItemsLibraryType type) { Utils.checkNotNull(type, "type"); this.type = type; return this; @@ -2295,13 +2477,13 @@ public class GetLibraryItemsMetadata { return this; } - public Builder flattenSeasons(FlattenSeasons flattenSeasons) { + public Builder flattenSeasons(GetLibraryItemsFlattenSeasons flattenSeasons) { Utils.checkNotNull(flattenSeasons, "flattenSeasons"); this.flattenSeasons = Optional.ofNullable(flattenSeasons); return this; } - public Builder flattenSeasons(Optional flattenSeasons) { + public Builder flattenSeasons(Optional flattenSeasons) { Utils.checkNotNull(flattenSeasons, "flattenSeasons"); this.flattenSeasons = flattenSeasons; return this; @@ -2316,7 +2498,7 @@ public class GetLibraryItemsMetadata { * absolute = TheTVDB (Absolute)). * */ - public Builder showOrdering(ShowOrdering showOrdering) { + public Builder showOrdering(GetLibraryItemsShowOrdering showOrdering) { Utils.checkNotNull(showOrdering, "showOrdering"); this.showOrdering = Optional.ofNullable(showOrdering); return this; @@ -2331,7 +2513,7 @@ public class GetLibraryItemsMetadata { * absolute = TheTVDB (Absolute)). * */ - public Builder showOrdering(Optional showOrdering) { + public Builder showOrdering(Optional showOrdering) { Utils.checkNotNull(showOrdering, "showOrdering"); this.showOrdering = showOrdering; return this; @@ -2532,6 +2714,18 @@ public class GetLibraryItemsMetadata { 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; + } + public Builder grandparentSlug(String grandparentSlug) { Utils.checkNotNull(grandparentSlug, "grandparentSlug"); this.grandparentSlug = Optional.ofNullable(grandparentSlug); @@ -2636,13 +2830,13 @@ public class GetLibraryItemsMetadata { return this; } - public Builder collection(List collection) { + public Builder collection(List collection) { Utils.checkNotNull(collection, "collection"); this.collection = Optional.ofNullable(collection); return this; } - public Builder collection(Optional> collection) { + public Builder collection(Optional> collection) { Utils.checkNotNull(collection, "collection"); this.collection = collection; return this; @@ -2664,7 +2858,7 @@ public class GetLibraryItemsMetadata { * The Guid object is only included in the response if the `includeGuids` parameter is set to `1`. * */ - public Builder mediaGuid(List mediaGuid) { + public Builder mediaGuid(List mediaGuid) { Utils.checkNotNull(mediaGuid, "mediaGuid"); this.mediaGuid = Optional.ofNullable(mediaGuid); return this; @@ -2674,24 +2868,36 @@ public class GetLibraryItemsMetadata { * The Guid object is only included in the response if the `includeGuids` parameter is set to `1`. * */ - public Builder mediaGuid(Optional> mediaGuid) { + public Builder mediaGuid(Optional> mediaGuid) { Utils.checkNotNull(mediaGuid, "mediaGuid"); this.mediaGuid = mediaGuid; return this; } - public Builder ultraBlurColors(UltraBlurColors ultraBlurColors) { + public Builder ultraBlurColors(GetLibraryItemsUltraBlurColors ultraBlurColors) { Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); this.ultraBlurColors = Optional.ofNullable(ultraBlurColors); return this; } - public Builder ultraBlurColors(Optional ultraBlurColors) { + 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); @@ -2985,6 +3191,9 @@ public class GetLibraryItemsMetadata { guid, studio, skipChildren, + librarySectionID, + librarySectionTitle, + librarySectionKey, type, title, slug, @@ -3013,6 +3222,7 @@ public class GetLibraryItemsMetadata { grandparentKey, grandparentTitle, grandparentThumb, + parentSlug, grandparentSlug, grandparentArt, grandparentTheme, @@ -3025,6 +3235,7 @@ public class GetLibraryItemsMetadata { role, mediaGuid, ultraBlurColors, + metaDataRating, image, titleSort, viewCount, @@ -3050,11 +3261,11 @@ public class GetLibraryItemsMetadata { parentTheme); } - private static final LazySingletonValue> _SINGLETON_VALUE_FlattenSeasons = + private static final LazySingletonValue> _SINGLETON_VALUE_FlattenSeasons = new LazySingletonValue<>( "flattenSeasons", "\"0\"", - new TypeReference>() {}); + new TypeReference>() {}); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsOptimizedForStreaming.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsOptimizedForStreaming.java new file mode 100644 index 00000000..1e7590c1 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsOptimizedForStreaming.java @@ -0,0 +1,23 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; + +public enum GetLibraryItemsOptimizedForStreaming { + Disable(0), + Enable(1); + + @JsonValue + private final int value; + + private GetLibraryItemsOptimizedForStreaming(int value) { + this.value = value; + } + + public int value() { + return value; + } +} 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 fbc1bd43..fde85b1c 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsPart.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsPart.java @@ -13,11 +13,13 @@ 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.Integer; 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; @@ -50,6 +52,14 @@ public class GetLibraryItemsPart { @JsonProperty("audioProfile") private Optional audioProfile; + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("has64bitOffsets") + private Optional has64bitOffsets; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("optimizedForStreaming") + private Optional optimizedForStreaming; + @JsonProperty("videoProfile") private String videoProfile; @@ -59,7 +69,11 @@ public class GetLibraryItemsPart { @JsonInclude(Include.NON_ABSENT) @JsonProperty("hasThumbnail") - private Optional hasThumbnail; + private Optional hasThumbnail; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Stream") + private Optional> stream; @JsonCreator public GetLibraryItemsPart( @@ -70,9 +84,12 @@ public class GetLibraryItemsPart { @JsonProperty("size") long size, @JsonProperty("container") String container, @JsonProperty("audioProfile") Optional audioProfile, + @JsonProperty("has64bitOffsets") Optional has64bitOffsets, + @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, @JsonProperty("videoProfile") String videoProfile, @JsonProperty("indexes") Optional indexes, - @JsonProperty("hasThumbnail") Optional hasThumbnail) { + @JsonProperty("hasThumbnail") Optional hasThumbnail, + @JsonProperty("Stream") Optional> stream) { Utils.checkNotNull(id, "id"); Utils.checkNotNull(key, "key"); Utils.checkNotNull(duration, "duration"); @@ -80,9 +97,12 @@ public class GetLibraryItemsPart { Utils.checkNotNull(size, "size"); Utils.checkNotNull(container, "container"); 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.id = id; this.key = key; this.duration = duration; @@ -90,9 +110,12 @@ public class GetLibraryItemsPart { this.size = size; this.container = container; this.audioProfile = audioProfile; + this.has64bitOffsets = has64bitOffsets; + this.optimizedForStreaming = optimizedForStreaming; this.videoProfile = videoProfile; this.indexes = indexes; this.hasThumbnail = hasThumbnail; + this.stream = stream; } public GetLibraryItemsPart( @@ -103,7 +126,7 @@ public class GetLibraryItemsPart { long size, String container, String videoProfile) { - this(id, key, duration, file, size, container, Optional.empty(), videoProfile, Optional.empty(), Optional.empty()); + this(id, key, duration, file, size, container, Optional.empty(), Optional.empty(), Optional.empty(), videoProfile, Optional.empty(), Optional.empty(), Optional.empty()); } @JsonIgnore @@ -145,6 +168,16 @@ public class GetLibraryItemsPart { return audioProfile; } + @JsonIgnore + public Optional has64bitOffsets() { + return has64bitOffsets; + } + + @JsonIgnore + public Optional optimizedForStreaming() { + return optimizedForStreaming; + } + @JsonIgnore public String videoProfile() { return videoProfile; @@ -157,8 +190,14 @@ public class GetLibraryItemsPart { @SuppressWarnings("unchecked") @JsonIgnore - public Optional hasThumbnail() { - return (Optional) hasThumbnail; + public Optional hasThumbnail() { + return (Optional) hasThumbnail; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> stream() { + return (Optional>) stream; } public final static Builder builder() { @@ -217,6 +256,30 @@ public class GetLibraryItemsPart { return this; } + public GetLibraryItemsPart withHas64bitOffsets(boolean has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); + return this; + } + + public GetLibraryItemsPart withHas64bitOffsets(Optional has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = has64bitOffsets; + return this; + } + + public GetLibraryItemsPart withOptimizedForStreaming(boolean optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); + return this; + } + + 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 = videoProfile; @@ -235,17 +298,29 @@ public class GetLibraryItemsPart { return this; } - public GetLibraryItemsPart withHasThumbnail(HasThumbnail hasThumbnail) { + public GetLibraryItemsPart withHasThumbnail(GetLibraryItemsHasThumbnail hasThumbnail) { Utils.checkNotNull(hasThumbnail, "hasThumbnail"); this.hasThumbnail = Optional.ofNullable(hasThumbnail); return this; } - public GetLibraryItemsPart withHasThumbnail(Optional hasThumbnail) { + public GetLibraryItemsPart withHasThumbnail(Optional hasThumbnail) { Utils.checkNotNull(hasThumbnail, "hasThumbnail"); this.hasThumbnail = hasThumbnail; 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) { @@ -264,9 +339,12 @@ public class GetLibraryItemsPart { Objects.deepEquals(this.size, other.size) && Objects.deepEquals(this.container, other.container) && 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.hasThumbnail, other.hasThumbnail) && + Objects.deepEquals(this.stream, other.stream); } @Override @@ -279,9 +357,12 @@ public class GetLibraryItemsPart { size, container, audioProfile, + has64bitOffsets, + optimizedForStreaming, videoProfile, indexes, - hasThumbnail); + hasThumbnail, + stream); } @Override @@ -294,9 +375,12 @@ public class GetLibraryItemsPart { "size", size, "container", container, "audioProfile", audioProfile, + "has64bitOffsets", has64bitOffsets, + "optimizedForStreaming", optimizedForStreaming, "videoProfile", videoProfile, "indexes", indexes, - "hasThumbnail", hasThumbnail); + "hasThumbnail", hasThumbnail, + "stream", stream); } public final static class Builder { @@ -315,11 +399,17 @@ public class GetLibraryItemsPart { private Optional audioProfile = Optional.empty(); + private Optional has64bitOffsets = Optional.empty(); + + private Optional optimizedForStreaming = Optional.empty(); + private String videoProfile; private Optional indexes = Optional.empty(); - private Optional hasThumbnail; + private Optional hasThumbnail; + + private Optional> stream = Optional.empty(); private Builder() { // force use of static builder() method @@ -377,6 +467,30 @@ public class GetLibraryItemsPart { return this; } + public Builder has64bitOffsets(boolean has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); + return this; + } + + public Builder has64bitOffsets(Optional has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = has64bitOffsets; + return this; + } + + public Builder optimizedForStreaming(boolean optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); + return this; + } + + 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 = videoProfile; @@ -395,17 +509,29 @@ public class GetLibraryItemsPart { return this; } - public Builder hasThumbnail(HasThumbnail hasThumbnail) { + public Builder hasThumbnail(GetLibraryItemsHasThumbnail hasThumbnail) { Utils.checkNotNull(hasThumbnail, "hasThumbnail"); this.hasThumbnail = Optional.ofNullable(hasThumbnail); return this; } - public Builder hasThumbnail(Optional hasThumbnail) { + public Builder hasThumbnail(Optional hasThumbnail) { Utils.checkNotNull(hasThumbnail, "hasThumbnail"); 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) { @@ -418,16 +544,19 @@ public class GetLibraryItemsPart { size, container, audioProfile, + has64bitOffsets, + optimizedForStreaming, videoProfile, indexes, - hasThumbnail); + hasThumbnail, + stream); } - private static final LazySingletonValue> _SINGLETON_VALUE_HasThumbnail = + private static final LazySingletonValue> _SINGLETON_VALUE_HasThumbnail = new LazySingletonValue<>( "hasThumbnail", "\"0\"", - new TypeReference>() {}); + new TypeReference>() {}); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsQueryParamIncludeMeta.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsQueryParamIncludeMeta.java new file mode 100644 index 00000000..453b9fb6 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsQueryParamIncludeMeta.java @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * GetLibraryItemsQueryParamIncludeMeta - Adds the Meta object to the response + * + */ +public enum GetLibraryItemsQueryParamIncludeMeta { + Disable(0), + Enable(1); + + @JsonValue + private final int value; + + private GetLibraryItemsQueryParamIncludeMeta(int value) { + this.value = value; + } + + public int value() { + return value; + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsQueryParamType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsQueryParamType.java new file mode 100644 index 00000000..d6e4bcc2 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsQueryParamType.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; + +/** + * GetLibraryItemsQueryParamType - The type of media to retrieve. + * 1 = movie + * 2 = show + * 3 = season + * 4 = episode + * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + * + */ +public enum GetLibraryItemsQueryParamType { + Movie(1L), + TvShow(2L), + Season(3L), + Episode(4L); + + @JsonValue + private final long value; + + private GetLibraryItemsQueryParamType(long value) { + this.value = value; + } + + public long value() { + return value; + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsRequest.java index 5322c0c9..d6984b2c 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsRequest.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsRequest.java @@ -42,13 +42,6 @@ public class GetLibraryItemsRequest { @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeGuids") private Optional includeGuids; - /** - * Adds the Meta object to the response - * - */ - @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeMeta") - private Optional includeMeta; - /** * The type of media to retrieve. * 1 = movie @@ -59,7 +52,14 @@ public class GetLibraryItemsRequest { * */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") - private Optional type; + private Optional type; + + /** + * Adds the Meta object to the response + * + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeMeta") + private Optional includeMeta; /** * The index of the first item to return. If not specified, the first item will be returned. @@ -84,22 +84,22 @@ public class GetLibraryItemsRequest { int sectionKey, Tag tag, Optional includeGuids, - Optional includeMeta, - Optional type, + Optional type, + Optional includeMeta, Optional xPlexContainerStart, Optional xPlexContainerSize) { Utils.checkNotNull(sectionKey, "sectionKey"); Utils.checkNotNull(tag, "tag"); Utils.checkNotNull(includeGuids, "includeGuids"); - Utils.checkNotNull(includeMeta, "includeMeta"); Utils.checkNotNull(type, "type"); + Utils.checkNotNull(includeMeta, "includeMeta"); Utils.checkNotNull(xPlexContainerStart, "xPlexContainerStart"); Utils.checkNotNull(xPlexContainerSize, "xPlexContainerSize"); this.sectionKey = sectionKey; this.tag = tag; this.includeGuids = includeGuids; - this.includeMeta = includeMeta; this.type = type; + this.includeMeta = includeMeta; this.xPlexContainerStart = xPlexContainerStart; this.xPlexContainerSize = xPlexContainerSize; } @@ -138,16 +138,6 @@ public class GetLibraryItemsRequest { return (Optional) includeGuids; } - /** - * Adds the Meta object to the response - * - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional includeMeta() { - return (Optional) includeMeta; - } - /** * The type of media to retrieve. * 1 = movie @@ -159,8 +149,18 @@ public class GetLibraryItemsRequest { */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional type() { - return (Optional) type; + public Optional type() { + return (Optional) type; + } + + /** + * Adds the Meta object to the response + * + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional includeMeta() { + return (Optional) includeMeta; } /** @@ -229,26 +229,6 @@ public class GetLibraryItemsRequest { return this; } - /** - * Adds the Meta object to the response - * - */ - public GetLibraryItemsRequest withIncludeMeta(IncludeMeta includeMeta) { - Utils.checkNotNull(includeMeta, "includeMeta"); - this.includeMeta = Optional.ofNullable(includeMeta); - return this; - } - - /** - * Adds the Meta object to the response - * - */ - public GetLibraryItemsRequest withIncludeMeta(Optional includeMeta) { - Utils.checkNotNull(includeMeta, "includeMeta"); - this.includeMeta = includeMeta; - return this; - } - /** * The type of media to retrieve. * 1 = movie @@ -258,7 +238,7 @@ public class GetLibraryItemsRequest { * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries * */ - public GetLibraryItemsRequest withType(Type type) { + public GetLibraryItemsRequest withType(GetLibraryItemsQueryParamType type) { Utils.checkNotNull(type, "type"); this.type = Optional.ofNullable(type); return this; @@ -273,12 +253,32 @@ public class GetLibraryItemsRequest { * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries * */ - public GetLibraryItemsRequest withType(Optional type) { + public GetLibraryItemsRequest withType(Optional type) { Utils.checkNotNull(type, "type"); this.type = type; return this; } + /** + * Adds the Meta object to the response + * + */ + public GetLibraryItemsRequest withIncludeMeta(GetLibraryItemsQueryParamIncludeMeta includeMeta) { + Utils.checkNotNull(includeMeta, "includeMeta"); + this.includeMeta = Optional.ofNullable(includeMeta); + return this; + } + + /** + * Adds the Meta object to the response + * + */ + public GetLibraryItemsRequest withIncludeMeta(Optional includeMeta) { + Utils.checkNotNull(includeMeta, "includeMeta"); + this.includeMeta = includeMeta; + return this; + } + /** * The index of the first item to return. If not specified, the first item will be returned. * If the number of items exceeds the limit, the response will be paginated. @@ -340,8 +340,8 @@ public class GetLibraryItemsRequest { Objects.deepEquals(this.sectionKey, other.sectionKey) && Objects.deepEquals(this.tag, other.tag) && Objects.deepEquals(this.includeGuids, other.includeGuids) && - Objects.deepEquals(this.includeMeta, other.includeMeta) && Objects.deepEquals(this.type, other.type) && + Objects.deepEquals(this.includeMeta, other.includeMeta) && Objects.deepEquals(this.xPlexContainerStart, other.xPlexContainerStart) && Objects.deepEquals(this.xPlexContainerSize, other.xPlexContainerSize); } @@ -352,8 +352,8 @@ public class GetLibraryItemsRequest { sectionKey, tag, includeGuids, - includeMeta, type, + includeMeta, xPlexContainerStart, xPlexContainerSize); } @@ -364,8 +364,8 @@ public class GetLibraryItemsRequest { "sectionKey", sectionKey, "tag", tag, "includeGuids", includeGuids, - "includeMeta", includeMeta, "type", type, + "includeMeta", includeMeta, "xPlexContainerStart", xPlexContainerStart, "xPlexContainerSize", xPlexContainerSize); } @@ -378,9 +378,9 @@ public class GetLibraryItemsRequest { private Optional includeGuids; - private Optional includeMeta; + private Optional type = Optional.empty(); - private Optional type = Optional.empty(); + private Optional includeMeta; private Optional xPlexContainerStart; @@ -430,26 +430,6 @@ public class GetLibraryItemsRequest { return this; } - /** - * Adds the Meta object to the response - * - */ - public Builder includeMeta(IncludeMeta includeMeta) { - Utils.checkNotNull(includeMeta, "includeMeta"); - this.includeMeta = Optional.ofNullable(includeMeta); - return this; - } - - /** - * Adds the Meta object to the response - * - */ - public Builder includeMeta(Optional includeMeta) { - Utils.checkNotNull(includeMeta, "includeMeta"); - this.includeMeta = includeMeta; - return this; - } - /** * The type of media to retrieve. * 1 = movie @@ -459,7 +439,7 @@ public class GetLibraryItemsRequest { * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries * */ - public Builder type(Type type) { + public Builder type(GetLibraryItemsQueryParamType type) { Utils.checkNotNull(type, "type"); this.type = Optional.ofNullable(type); return this; @@ -474,12 +454,32 @@ public class GetLibraryItemsRequest { * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries * */ - public Builder type(Optional type) { + public Builder type(Optional type) { Utils.checkNotNull(type, "type"); this.type = type; return this; } + /** + * Adds the Meta object to the response + * + */ + public Builder includeMeta(GetLibraryItemsQueryParamIncludeMeta includeMeta) { + Utils.checkNotNull(includeMeta, "includeMeta"); + this.includeMeta = Optional.ofNullable(includeMeta); + return this; + } + + /** + * Adds the Meta object to the response + * + */ + public Builder includeMeta(Optional includeMeta) { + Utils.checkNotNull(includeMeta, "includeMeta"); + this.includeMeta = includeMeta; + return this; + } + /** * The index of the first item to return. If not specified, the first item will be returned. * If the number of items exceeds the limit, the response will be paginated. @@ -544,8 +544,8 @@ public class GetLibraryItemsRequest { sectionKey, tag, includeGuids, - includeMeta, type, + includeMeta, xPlexContainerStart, xPlexContainerSize); } @@ -556,11 +556,11 @@ public class GetLibraryItemsRequest { "0", new TypeReference>() {}); - private static final LazySingletonValue> _SINGLETON_VALUE_IncludeMeta = + private static final LazySingletonValue> _SINGLETON_VALUE_IncludeMeta = new LazySingletonValue<>( "includeMeta", "0", - new TypeReference>() {}); + new TypeReference>() {}); private static final LazySingletonValue> _SINGLETON_VALUE_XPlexContainerStart = new LazySingletonValue<>( 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 78106ba4..46c48a3e 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsRole.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsRole.java @@ -11,6 +11,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.Override; import java.lang.String; import java.util.Objects; @@ -19,41 +20,233 @@ import java.util.Optional; public class GetLibraryItemsRole { + /** + * The ID of the tag or actor. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + /** + * The filter used to find the actor or tag. + */ + @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; + /** + * Unique identifier for the tag. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tagKey") + private Optional tagKey; + + /** + * The role of the actor or tag in the media. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("role") + private Optional role; + @JsonCreator public GetLibraryItemsRole( - @JsonProperty("tag") Optional tag) { + @JsonProperty("id") Optional id, + @JsonProperty("filter") Optional filter, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("tag") Optional tag, + @JsonProperty("tagKey") Optional tagKey, + @JsonProperty("role") Optional role) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(filter, "filter"); + Utils.checkNotNull(thumb, "thumb"); Utils.checkNotNull(tag, "tag"); + Utils.checkNotNull(tagKey, "tagKey"); + Utils.checkNotNull(role, "role"); + this.id = id; + this.filter = filter; + this.thumb = thumb; this.tag = tag; + this.tagKey = tagKey; + this.role = role; } public GetLibraryItemsRole() { - this(Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); } + /** + * The ID of the tag or actor. + */ + @JsonIgnore + public Optional id() { + return id; + } + + /** + * The filter used to find the actor or tag. + */ + @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() { return tag; } + /** + * Unique identifier for the tag. + */ + @JsonIgnore + public Optional tagKey() { + return tagKey; + } + + /** + * The role of the actor or tag in the media. + */ + @JsonIgnore + public Optional role() { + return role; + } + public final static Builder builder() { return new Builder(); } + /** + * The ID of the tag or actor. + */ + 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) { + 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. + */ 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. + */ + public GetLibraryItemsRole withRole(String role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); + return this; + } + + /** + * The role of the actor or tag in the media. + */ + public GetLibraryItemsRole withRole(Optional role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } @Override public boolean equals(java.lang.Object o) { @@ -65,44 +258,170 @@ public class GetLibraryItemsRole { } GetLibraryItemsRole other = (GetLibraryItemsRole) o; return - Objects.deepEquals(this.tag, other.tag); + 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); } @Override public int hashCode() { return Objects.hash( - tag); + id, + filter, + thumb, + tag, + tagKey, + role); } @Override public String toString() { return Utils.toString(GetLibraryItemsRole.class, - "tag", tag); + "id", id, + "filter", filter, + "thumb", thumb, + "tag", tag, + "tagKey", tagKey, + "role", role); } public final static class Builder { - private Optional tag = Optional.empty(); + private Optional id = Optional.empty(); + + private Optional filter = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional tag = Optional.empty(); + + private Optional tagKey = Optional.empty(); + + private Optional role = Optional.empty(); private Builder() { // force use of static builder() method } + /** + * The ID of the tag or actor. + */ + 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) { + 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. + */ 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. + */ + public Builder role(String role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); + return this; + } + + /** + * The role of the actor or tag in the media. + */ + public Builder role(Optional role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } public GetLibraryItemsRole build() { return new GetLibraryItemsRole( - tag); + id, + filter, + thumb, + tag, + tagKey, + role); } } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsShowOrdering.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsShowOrdering.java new file mode 100644 index 00000000..e9c1e5e7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsShowOrdering.java @@ -0,0 +1,36 @@ +/* + * 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; + +/** + * GetLibraryItemsShowOrdering - 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 enum GetLibraryItemsShowOrdering { + None("None"), + TmdbAiring("tmdbAiring"), + Aired("aired"), + Dvd("dvd"), + Absolute("absolute"); + + @JsonValue + private final String value; + + private GetLibraryItemsShowOrdering(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsSort.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsSort.java index 7b325a87..4f6dc258 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsSort.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsSort.java @@ -37,7 +37,7 @@ public class GetLibraryItemsSort { */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("activeDirection") - private Optional activeDirection; + private Optional activeDirection; /** * The direction of the sort. Can be either `asc` or `desc`. @@ -45,7 +45,7 @@ public class GetLibraryItemsSort { */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("defaultDirection") - private Optional defaultDirection; + private Optional defaultDirection; @JsonInclude(Include.NON_ABSENT) @JsonProperty("descKey") @@ -65,8 +65,8 @@ public class GetLibraryItemsSort { public GetLibraryItemsSort( @JsonProperty("default") Optional default_, @JsonProperty("active") Optional active, - @JsonProperty("activeDirection") Optional activeDirection, - @JsonProperty("defaultDirection") Optional defaultDirection, + @JsonProperty("activeDirection") Optional activeDirection, + @JsonProperty("defaultDirection") Optional defaultDirection, @JsonProperty("descKey") Optional descKey, @JsonProperty("firstCharacterKey") Optional firstCharacterKey, @JsonProperty("key") String key, @@ -111,8 +111,8 @@ public class GetLibraryItemsSort { */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional activeDirection() { - return (Optional) activeDirection; + public Optional activeDirection() { + return (Optional) activeDirection; } /** @@ -121,8 +121,8 @@ public class GetLibraryItemsSort { */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional defaultDirection() { - return (Optional) defaultDirection; + public Optional defaultDirection() { + return (Optional) defaultDirection; } @JsonIgnore @@ -177,7 +177,7 @@ public class GetLibraryItemsSort { * The direction of the sort. Can be either `asc` or `desc`. * */ - public GetLibraryItemsSort withActiveDirection(ActiveDirection activeDirection) { + public GetLibraryItemsSort withActiveDirection(GetLibraryItemsActiveDirection activeDirection) { Utils.checkNotNull(activeDirection, "activeDirection"); this.activeDirection = Optional.ofNullable(activeDirection); return this; @@ -187,7 +187,7 @@ public class GetLibraryItemsSort { * The direction of the sort. Can be either `asc` or `desc`. * */ - public GetLibraryItemsSort withActiveDirection(Optional activeDirection) { + public GetLibraryItemsSort withActiveDirection(Optional activeDirection) { Utils.checkNotNull(activeDirection, "activeDirection"); this.activeDirection = activeDirection; return this; @@ -197,7 +197,7 @@ public class GetLibraryItemsSort { * The direction of the sort. Can be either `asc` or `desc`. * */ - public GetLibraryItemsSort withDefaultDirection(DefaultDirection defaultDirection) { + public GetLibraryItemsSort withDefaultDirection(GetLibraryItemsDefaultDirection defaultDirection) { Utils.checkNotNull(defaultDirection, "defaultDirection"); this.defaultDirection = Optional.ofNullable(defaultDirection); return this; @@ -207,7 +207,7 @@ public class GetLibraryItemsSort { * The direction of the sort. Can be either `asc` or `desc`. * */ - public GetLibraryItemsSort withDefaultDirection(Optional defaultDirection) { + public GetLibraryItemsSort withDefaultDirection(Optional defaultDirection) { Utils.checkNotNull(defaultDirection, "defaultDirection"); this.defaultDirection = defaultDirection; return this; @@ -301,9 +301,9 @@ public class GetLibraryItemsSort { private Optional active = Optional.empty(); - private Optional activeDirection; + private Optional activeDirection; - private Optional defaultDirection; + private Optional defaultDirection; private Optional descKey = Optional.empty(); @@ -345,7 +345,7 @@ public class GetLibraryItemsSort { * The direction of the sort. Can be either `asc` or `desc`. * */ - public Builder activeDirection(ActiveDirection activeDirection) { + public Builder activeDirection(GetLibraryItemsActiveDirection activeDirection) { Utils.checkNotNull(activeDirection, "activeDirection"); this.activeDirection = Optional.ofNullable(activeDirection); return this; @@ -355,7 +355,7 @@ public class GetLibraryItemsSort { * The direction of the sort. Can be either `asc` or `desc`. * */ - public Builder activeDirection(Optional activeDirection) { + public Builder activeDirection(Optional activeDirection) { Utils.checkNotNull(activeDirection, "activeDirection"); this.activeDirection = activeDirection; return this; @@ -365,7 +365,7 @@ public class GetLibraryItemsSort { * The direction of the sort. Can be either `asc` or `desc`. * */ - public Builder defaultDirection(DefaultDirection defaultDirection) { + public Builder defaultDirection(GetLibraryItemsDefaultDirection defaultDirection) { Utils.checkNotNull(defaultDirection, "defaultDirection"); this.defaultDirection = Optional.ofNullable(defaultDirection); return this; @@ -375,7 +375,7 @@ public class GetLibraryItemsSort { * The direction of the sort. Can be either `asc` or `desc`. * */ - public Builder defaultDirection(Optional defaultDirection) { + public Builder defaultDirection(Optional defaultDirection) { Utils.checkNotNull(defaultDirection, "defaultDirection"); this.defaultDirection = defaultDirection; return this; @@ -434,17 +434,17 @@ public class GetLibraryItemsSort { title); } - private static final LazySingletonValue> _SINGLETON_VALUE_ActiveDirection = + private static final LazySingletonValue> _SINGLETON_VALUE_ActiveDirection = new LazySingletonValue<>( "activeDirection", "\"asc\"", - new TypeReference>() {}); + new TypeReference>() {}); - private static final LazySingletonValue> _SINGLETON_VALUE_DefaultDirection = + private static final LazySingletonValue> _SINGLETON_VALUE_DefaultDirection = new LazySingletonValue<>( "defaultDirection", "\"asc\"", - new TypeReference>() {}); + new TypeReference>() {}); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsStream.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsStream.java new file mode 100644 index 00000000..6c605ec8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsStream.java @@ -0,0 +1,2212 @@ +/* + * 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 890b920c..258dc82b 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsType.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsType.java @@ -4,27 +4,316 @@ package dev.plexapi.sdk.models.operations; -import com.fasterxml.jackson.annotation.JsonValue; + +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.List; +import java.util.Objects; +import java.util.Optional; -/** - * GetLibraryItemsType - The type of media content - * - */ -public enum GetLibraryItemsType { - Movie("movie"), - TvShow("show"), - Season("season"), - Episode("episode"); - @JsonValue - private final String value; +public class GetLibraryItemsType { - private GetLibraryItemsType(String value) { - this.value = value; + @JsonProperty("key") + private String key; + + @JsonProperty("type") + private String type; + + @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("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 String value() { - return value; + public GetLibraryItemsType( + String key, + String type, + String title, + boolean active) { + this(key, type, title, active, Optional.empty(), Optional.empty(), Optional.empty()); + } + + @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 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 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; + } + 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.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); + } + + @Override + public int hashCode() { + return Objects.hash( + key, + type, + title, + active, + filter, + sort, + field); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryItemsType.class, + "key", key, + "type", type, + "title", title, + "active", active, + "filter", filter, + "sort", sort, + "field", field); + } + + 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 + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = type; + 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, + title, + active, + filter, + sort, + field); + } } } + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsUltraBlurColors.java b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsUltraBlurColors.java new file mode 100644 index 00000000..b2539825 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetLibraryItemsUltraBlurColors.java @@ -0,0 +1,176 @@ +/* + * 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 GetLibraryItemsUltraBlurColors { + + @JsonProperty("topLeft") + private String topLeft; + + @JsonProperty("topRight") + private String topRight; + + @JsonProperty("bottomRight") + private String bottomRight; + + @JsonProperty("bottomLeft") + private String bottomLeft; + + @JsonCreator + public GetLibraryItemsUltraBlurColors( + @JsonProperty("topLeft") String topLeft, + @JsonProperty("topRight") String topRight, + @JsonProperty("bottomRight") String bottomRight, + @JsonProperty("bottomLeft") String bottomLeft) { + Utils.checkNotNull(topLeft, "topLeft"); + Utils.checkNotNull(topRight, "topRight"); + Utils.checkNotNull(bottomRight, "bottomRight"); + Utils.checkNotNull(bottomLeft, "bottomLeft"); + this.topLeft = topLeft; + this.topRight = topRight; + this.bottomRight = bottomRight; + this.bottomLeft = bottomLeft; + } + + @JsonIgnore + public String topLeft() { + return topLeft; + } + + @JsonIgnore + public String topRight() { + return topRight; + } + + @JsonIgnore + public String bottomRight() { + return bottomRight; + } + + @JsonIgnore + public String bottomLeft() { + return bottomLeft; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLibraryItemsUltraBlurColors withTopLeft(String topLeft) { + Utils.checkNotNull(topLeft, "topLeft"); + this.topLeft = topLeft; + return this; + } + + public GetLibraryItemsUltraBlurColors withTopRight(String topRight) { + Utils.checkNotNull(topRight, "topRight"); + this.topRight = topRight; + return this; + } + + public GetLibraryItemsUltraBlurColors withBottomRight(String bottomRight) { + Utils.checkNotNull(bottomRight, "bottomRight"); + this.bottomRight = bottomRight; + return this; + } + + public GetLibraryItemsUltraBlurColors withBottomLeft(String bottomLeft) { + Utils.checkNotNull(bottomLeft, "bottomLeft"); + this.bottomLeft = bottomLeft; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLibraryItemsUltraBlurColors other = (GetLibraryItemsUltraBlurColors) o; + return + Objects.deepEquals(this.topLeft, other.topLeft) && + Objects.deepEquals(this.topRight, other.topRight) && + Objects.deepEquals(this.bottomRight, other.bottomRight) && + Objects.deepEquals(this.bottomLeft, other.bottomLeft); + } + + @Override + public int hashCode() { + return Objects.hash( + topLeft, + topRight, + bottomRight, + bottomLeft); + } + + @Override + public String toString() { + return Utils.toString(GetLibraryItemsUltraBlurColors.class, + "topLeft", topLeft, + "topRight", topRight, + "bottomRight", bottomRight, + "bottomLeft", bottomLeft); + } + + public final static class Builder { + + private String topLeft; + + private String topRight; + + private String bottomRight; + + private String bottomLeft; + + private Builder() { + // force use of static builder() method + } + + public Builder topLeft(String topLeft) { + Utils.checkNotNull(topLeft, "topLeft"); + this.topLeft = topLeft; + return this; + } + + public Builder topRight(String topRight) { + Utils.checkNotNull(topRight, "topRight"); + this.topRight = topRight; + return this; + } + + public Builder bottomRight(String bottomRight) { + Utils.checkNotNull(bottomRight, "bottomRight"); + this.bottomRight = bottomRight; + return this; + } + + public Builder bottomLeft(String bottomLeft) { + Utils.checkNotNull(bottomLeft, "bottomLeft"); + this.bottomLeft = bottomLeft; + return this; + } + + public GetLibraryItemsUltraBlurColors build() { + return new GetLibraryItemsUltraBlurColors( + topLeft, + topRight, + bottomRight, + bottomLeft); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMetaDataByRatingKeyPart.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMetaDataByRatingKeyPart.java index 15cdbb90..138dad9e 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetMetaDataByRatingKeyPart.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMetaDataByRatingKeyPart.java @@ -65,7 +65,7 @@ public class GetMetaDataByRatingKeyPart { @JsonInclude(Include.NON_ABSENT) @JsonProperty("Stream") - private Optional> stream; + private Optional> stream; @JsonCreator public GetMetaDataByRatingKeyPart( @@ -79,7 +79,7 @@ public class GetMetaDataByRatingKeyPart { @JsonProperty("has64bitOffsets") Optional has64bitOffsets, @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, @JsonProperty("videoProfile") Optional videoProfile, - @JsonProperty("Stream") Optional> stream) { + @JsonProperty("Stream") Optional> stream) { Utils.checkNotNull(id, "id"); Utils.checkNotNull(key, "key"); Utils.checkNotNull(duration, "duration"); @@ -160,8 +160,8 @@ public class GetMetaDataByRatingKeyPart { @SuppressWarnings("unchecked") @JsonIgnore - public Optional> stream() { - return (Optional>) stream; + public Optional> stream() { + return (Optional>) stream; } public final static Builder builder() { @@ -288,13 +288,13 @@ public class GetMetaDataByRatingKeyPart { return this; } - public GetMetaDataByRatingKeyPart withStream(List stream) { + public GetMetaDataByRatingKeyPart withStream(List stream) { Utils.checkNotNull(stream, "stream"); this.stream = Optional.ofNullable(stream); return this; } - public GetMetaDataByRatingKeyPart withStream(Optional> stream) { + public GetMetaDataByRatingKeyPart withStream(Optional> stream) { Utils.checkNotNull(stream, "stream"); this.stream = stream; return this; @@ -377,7 +377,7 @@ public class GetMetaDataByRatingKeyPart { private Optional videoProfile = Optional.empty(); - private Optional> stream = Optional.empty(); + private Optional> stream = Optional.empty(); private Builder() { // force use of static builder() method @@ -503,13 +503,13 @@ public class GetMetaDataByRatingKeyPart { return this; } - public Builder stream(List stream) { + public Builder stream(List stream) { Utils.checkNotNull(stream, "stream"); this.stream = Optional.ofNullable(stream); return this; } - public Builder stream(Optional> stream) { + public Builder stream(Optional> stream) { Utils.checkNotNull(stream, "stream"); this.stream = stream; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetMetaDataByRatingKeyStream.java b/src/main/java/dev/plexapi/sdk/models/operations/GetMetaDataByRatingKeyStream.java new file mode 100644 index 00000000..153d6d88 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetMetaDataByRatingKeyStream.java @@ -0,0 +1,1413 @@ +/* + * 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.Integer; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class GetMetaDataByRatingKeyStream { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("streamType") + private Optional streamType; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("default") + private Optional default_; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("codec") + private Optional codec; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("index") + private Optional index; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("bitrate") + private Optional bitrate; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("bitDepth") + private Optional bitDepth; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("chromaLocation") + private Optional chromaLocation; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("chromaSubsampling") + private Optional chromaSubsampling; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("codedHeight") + private Optional codedHeight; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("codedWidth") + private Optional codedWidth; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("colorPrimaries") + private Optional colorPrimaries; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("colorRange") + private Optional colorRange; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("colorSpace") + private Optional colorSpace; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("colorTrc") + private Optional colorTrc; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("frameRate") + private Optional frameRate; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hasScalingMatrix") + private Optional hasScalingMatrix; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("height") + private Optional height; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("level") + private Optional level; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("profile") + private Optional profile; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("refFrames") + private Optional refFrames; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("scanType") + private Optional scanType; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("streamIdentifier") + private Optional streamIdentifier; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("width") + private Optional width; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("displayTitle") + private Optional displayTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("extendedDisplayTitle") + private Optional extendedDisplayTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("selected") + private Optional selected; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("channels") + private Optional channels; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("language") + private Optional language; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("languageTag") + private Optional languageTag; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("languageCode") + private Optional languageCode; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("samplingRate") + private Optional samplingRate; + + @JsonCreator + public GetMetaDataByRatingKeyStream( + @JsonProperty("id") Optional id, + @JsonProperty("streamType") Optional streamType, + @JsonProperty("default") Optional default_, + @JsonProperty("codec") Optional codec, + @JsonProperty("index") Optional index, + @JsonProperty("bitrate") Optional bitrate, + @JsonProperty("bitDepth") Optional bitDepth, + @JsonProperty("chromaLocation") Optional chromaLocation, + @JsonProperty("chromaSubsampling") Optional chromaSubsampling, + @JsonProperty("codedHeight") Optional codedHeight, + @JsonProperty("codedWidth") Optional codedWidth, + @JsonProperty("colorPrimaries") Optional colorPrimaries, + @JsonProperty("colorRange") Optional colorRange, + @JsonProperty("colorSpace") Optional colorSpace, + @JsonProperty("colorTrc") Optional colorTrc, + @JsonProperty("frameRate") Optional frameRate, + @JsonProperty("hasScalingMatrix") Optional hasScalingMatrix, + @JsonProperty("height") Optional height, + @JsonProperty("level") Optional level, + @JsonProperty("profile") Optional profile, + @JsonProperty("refFrames") Optional refFrames, + @JsonProperty("scanType") Optional scanType, + @JsonProperty("streamIdentifier") Optional streamIdentifier, + @JsonProperty("width") Optional width, + @JsonProperty("displayTitle") Optional displayTitle, + @JsonProperty("extendedDisplayTitle") Optional extendedDisplayTitle, + @JsonProperty("selected") Optional selected, + @JsonProperty("channels") Optional channels, + @JsonProperty("language") Optional language, + @JsonProperty("languageTag") Optional languageTag, + @JsonProperty("languageCode") Optional languageCode, + @JsonProperty("samplingRate") Optional samplingRate) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(streamType, "streamType"); + Utils.checkNotNull(default_, "default_"); + Utils.checkNotNull(codec, "codec"); + Utils.checkNotNull(index, "index"); + Utils.checkNotNull(bitrate, "bitrate"); + Utils.checkNotNull(bitDepth, "bitDepth"); + Utils.checkNotNull(chromaLocation, "chromaLocation"); + Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); + Utils.checkNotNull(codedHeight, "codedHeight"); + Utils.checkNotNull(codedWidth, "codedWidth"); + Utils.checkNotNull(colorPrimaries, "colorPrimaries"); + Utils.checkNotNull(colorRange, "colorRange"); + Utils.checkNotNull(colorSpace, "colorSpace"); + Utils.checkNotNull(colorTrc, "colorTrc"); + Utils.checkNotNull(frameRate, "frameRate"); + Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); + Utils.checkNotNull(height, "height"); + Utils.checkNotNull(level, "level"); + Utils.checkNotNull(profile, "profile"); + Utils.checkNotNull(refFrames, "refFrames"); + Utils.checkNotNull(scanType, "scanType"); + Utils.checkNotNull(streamIdentifier, "streamIdentifier"); + Utils.checkNotNull(width, "width"); + Utils.checkNotNull(displayTitle, "displayTitle"); + Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); + Utils.checkNotNull(selected, "selected"); + Utils.checkNotNull(channels, "channels"); + Utils.checkNotNull(language, "language"); + Utils.checkNotNull(languageTag, "languageTag"); + Utils.checkNotNull(languageCode, "languageCode"); + Utils.checkNotNull(samplingRate, "samplingRate"); + this.id = id; + this.streamType = streamType; + this.default_ = default_; + this.codec = codec; + this.index = index; + this.bitrate = bitrate; + this.bitDepth = bitDepth; + this.chromaLocation = chromaLocation; + this.chromaSubsampling = chromaSubsampling; + this.codedHeight = codedHeight; + this.codedWidth = codedWidth; + this.colorPrimaries = colorPrimaries; + this.colorRange = colorRange; + this.colorSpace = colorSpace; + this.colorTrc = colorTrc; + this.frameRate = frameRate; + this.hasScalingMatrix = hasScalingMatrix; + this.height = height; + this.level = level; + this.profile = profile; + this.refFrames = refFrames; + this.scanType = scanType; + this.streamIdentifier = streamIdentifier; + this.width = width; + this.displayTitle = displayTitle; + this.extendedDisplayTitle = extendedDisplayTitle; + this.selected = selected; + this.channels = channels; + this.language = language; + this.languageTag = languageTag; + this.languageCode = languageCode; + this.samplingRate = samplingRate; + } + + public GetMetaDataByRatingKeyStream() { + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), 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 Optional id() { + return id; + } + + @JsonIgnore + public Optional streamType() { + return streamType; + } + + @JsonIgnore + public Optional default_() { + return default_; + } + + @JsonIgnore + public Optional codec() { + return codec; + } + + @JsonIgnore + public Optional index() { + return index; + } + + @JsonIgnore + public Optional bitrate() { + return bitrate; + } + + @JsonIgnore + public Optional bitDepth() { + return bitDepth; + } + + @JsonIgnore + public Optional chromaLocation() { + return chromaLocation; + } + + @JsonIgnore + public Optional chromaSubsampling() { + return chromaSubsampling; + } + + @JsonIgnore + public Optional codedHeight() { + return codedHeight; + } + + @JsonIgnore + public Optional codedWidth() { + return codedWidth; + } + + @JsonIgnore + public Optional colorPrimaries() { + return colorPrimaries; + } + + @JsonIgnore + public Optional colorRange() { + return colorRange; + } + + @JsonIgnore + public Optional colorSpace() { + return colorSpace; + } + + @JsonIgnore + public Optional colorTrc() { + return colorTrc; + } + + @JsonIgnore + public Optional frameRate() { + return frameRate; + } + + @JsonIgnore + public Optional hasScalingMatrix() { + return hasScalingMatrix; + } + + @JsonIgnore + public Optional height() { + return height; + } + + @JsonIgnore + public Optional level() { + return level; + } + + @JsonIgnore + public Optional profile() { + return profile; + } + + @JsonIgnore + public Optional refFrames() { + return refFrames; + } + + @JsonIgnore + public Optional scanType() { + return scanType; + } + + @JsonIgnore + public Optional streamIdentifier() { + return streamIdentifier; + } + + @JsonIgnore + public Optional width() { + return width; + } + + @JsonIgnore + public Optional displayTitle() { + return displayTitle; + } + + @JsonIgnore + public Optional extendedDisplayTitle() { + return extendedDisplayTitle; + } + + @JsonIgnore + public Optional selected() { + return selected; + } + + @JsonIgnore + public Optional channels() { + return channels; + } + + @JsonIgnore + public Optional language() { + return language; + } + + @JsonIgnore + public Optional languageTag() { + return languageTag; + } + + @JsonIgnore + public Optional languageCode() { + return languageCode; + } + + @JsonIgnore + public Optional samplingRate() { + return samplingRate; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetMetaDataByRatingKeyStream withId(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public GetMetaDataByRatingKeyStream withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetMetaDataByRatingKeyStream withStreamType(int streamType) { + Utils.checkNotNull(streamType, "streamType"); + this.streamType = Optional.ofNullable(streamType); + return this; + } + + public GetMetaDataByRatingKeyStream withStreamType(Optional streamType) { + Utils.checkNotNull(streamType, "streamType"); + this.streamType = streamType; + return this; + } + + public GetMetaDataByRatingKeyStream withDefault(boolean default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = Optional.ofNullable(default_); + return this; + } + + public GetMetaDataByRatingKeyStream withDefault(Optional default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = default_; + return this; + } + + public GetMetaDataByRatingKeyStream withCodec(String codec) { + Utils.checkNotNull(codec, "codec"); + this.codec = Optional.ofNullable(codec); + return this; + } + + public GetMetaDataByRatingKeyStream withCodec(Optional codec) { + Utils.checkNotNull(codec, "codec"); + this.codec = codec; + return this; + } + + public GetMetaDataByRatingKeyStream withIndex(int index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + public GetMetaDataByRatingKeyStream withIndex(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + public GetMetaDataByRatingKeyStream withBitrate(int bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = Optional.ofNullable(bitrate); + return this; + } + + public GetMetaDataByRatingKeyStream withBitrate(Optional bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = bitrate; + return this; + } + + public GetMetaDataByRatingKeyStream withBitDepth(int bitDepth) { + Utils.checkNotNull(bitDepth, "bitDepth"); + this.bitDepth = Optional.ofNullable(bitDepth); + return this; + } + + public GetMetaDataByRatingKeyStream withBitDepth(Optional bitDepth) { + Utils.checkNotNull(bitDepth, "bitDepth"); + this.bitDepth = bitDepth; + return this; + } + + public GetMetaDataByRatingKeyStream withChromaLocation(String chromaLocation) { + Utils.checkNotNull(chromaLocation, "chromaLocation"); + this.chromaLocation = Optional.ofNullable(chromaLocation); + return this; + } + + public GetMetaDataByRatingKeyStream withChromaLocation(Optional chromaLocation) { + Utils.checkNotNull(chromaLocation, "chromaLocation"); + this.chromaLocation = chromaLocation; + return this; + } + + public GetMetaDataByRatingKeyStream withChromaSubsampling(String chromaSubsampling) { + Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); + this.chromaSubsampling = Optional.ofNullable(chromaSubsampling); + return this; + } + + public GetMetaDataByRatingKeyStream withChromaSubsampling(Optional chromaSubsampling) { + Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); + this.chromaSubsampling = chromaSubsampling; + return this; + } + + public GetMetaDataByRatingKeyStream withCodedHeight(int codedHeight) { + Utils.checkNotNull(codedHeight, "codedHeight"); + this.codedHeight = Optional.ofNullable(codedHeight); + return this; + } + + public GetMetaDataByRatingKeyStream withCodedHeight(Optional codedHeight) { + Utils.checkNotNull(codedHeight, "codedHeight"); + this.codedHeight = codedHeight; + return this; + } + + public GetMetaDataByRatingKeyStream withCodedWidth(int codedWidth) { + Utils.checkNotNull(codedWidth, "codedWidth"); + this.codedWidth = Optional.ofNullable(codedWidth); + return this; + } + + public GetMetaDataByRatingKeyStream withCodedWidth(Optional codedWidth) { + Utils.checkNotNull(codedWidth, "codedWidth"); + this.codedWidth = codedWidth; + return this; + } + + public GetMetaDataByRatingKeyStream withColorPrimaries(String colorPrimaries) { + Utils.checkNotNull(colorPrimaries, "colorPrimaries"); + this.colorPrimaries = Optional.ofNullable(colorPrimaries); + return this; + } + + public GetMetaDataByRatingKeyStream withColorPrimaries(Optional colorPrimaries) { + Utils.checkNotNull(colorPrimaries, "colorPrimaries"); + this.colorPrimaries = colorPrimaries; + return this; + } + + public GetMetaDataByRatingKeyStream withColorRange(String colorRange) { + Utils.checkNotNull(colorRange, "colorRange"); + this.colorRange = Optional.ofNullable(colorRange); + return this; + } + + public GetMetaDataByRatingKeyStream withColorRange(Optional colorRange) { + Utils.checkNotNull(colorRange, "colorRange"); + this.colorRange = colorRange; + return this; + } + + public GetMetaDataByRatingKeyStream withColorSpace(String colorSpace) { + Utils.checkNotNull(colorSpace, "colorSpace"); + this.colorSpace = Optional.ofNullable(colorSpace); + return this; + } + + public GetMetaDataByRatingKeyStream withColorSpace(Optional colorSpace) { + Utils.checkNotNull(colorSpace, "colorSpace"); + this.colorSpace = colorSpace; + return this; + } + + public GetMetaDataByRatingKeyStream withColorTrc(String colorTrc) { + Utils.checkNotNull(colorTrc, "colorTrc"); + this.colorTrc = Optional.ofNullable(colorTrc); + return this; + } + + public GetMetaDataByRatingKeyStream withColorTrc(Optional colorTrc) { + Utils.checkNotNull(colorTrc, "colorTrc"); + this.colorTrc = colorTrc; + return this; + } + + public GetMetaDataByRatingKeyStream withFrameRate(int frameRate) { + Utils.checkNotNull(frameRate, "frameRate"); + this.frameRate = Optional.ofNullable(frameRate); + return this; + } + + public GetMetaDataByRatingKeyStream withFrameRate(Optional frameRate) { + Utils.checkNotNull(frameRate, "frameRate"); + this.frameRate = frameRate; + return this; + } + + public GetMetaDataByRatingKeyStream withHasScalingMatrix(boolean hasScalingMatrix) { + Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); + this.hasScalingMatrix = Optional.ofNullable(hasScalingMatrix); + return this; + } + + public GetMetaDataByRatingKeyStream withHasScalingMatrix(Optional hasScalingMatrix) { + Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); + this.hasScalingMatrix = hasScalingMatrix; + return this; + } + + public GetMetaDataByRatingKeyStream withHeight(int height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + public GetMetaDataByRatingKeyStream withHeight(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + public GetMetaDataByRatingKeyStream withLevel(int level) { + Utils.checkNotNull(level, "level"); + this.level = Optional.ofNullable(level); + return this; + } + + public GetMetaDataByRatingKeyStream withLevel(Optional level) { + Utils.checkNotNull(level, "level"); + this.level = level; + return this; + } + + public GetMetaDataByRatingKeyStream withProfile(String profile) { + Utils.checkNotNull(profile, "profile"); + this.profile = Optional.ofNullable(profile); + return this; + } + + public GetMetaDataByRatingKeyStream withProfile(Optional profile) { + Utils.checkNotNull(profile, "profile"); + this.profile = profile; + return this; + } + + public GetMetaDataByRatingKeyStream withRefFrames(int refFrames) { + Utils.checkNotNull(refFrames, "refFrames"); + this.refFrames = Optional.ofNullable(refFrames); + return this; + } + + public GetMetaDataByRatingKeyStream withRefFrames(Optional refFrames) { + Utils.checkNotNull(refFrames, "refFrames"); + this.refFrames = refFrames; + return this; + } + + public GetMetaDataByRatingKeyStream withScanType(String scanType) { + Utils.checkNotNull(scanType, "scanType"); + this.scanType = Optional.ofNullable(scanType); + return this; + } + + public GetMetaDataByRatingKeyStream withScanType(Optional scanType) { + Utils.checkNotNull(scanType, "scanType"); + this.scanType = scanType; + return this; + } + + public GetMetaDataByRatingKeyStream withStreamIdentifier(String streamIdentifier) { + Utils.checkNotNull(streamIdentifier, "streamIdentifier"); + this.streamIdentifier = Optional.ofNullable(streamIdentifier); + return this; + } + + public GetMetaDataByRatingKeyStream withStreamIdentifier(Optional streamIdentifier) { + Utils.checkNotNull(streamIdentifier, "streamIdentifier"); + this.streamIdentifier = streamIdentifier; + return this; + } + + public GetMetaDataByRatingKeyStream withWidth(int width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + public GetMetaDataByRatingKeyStream withWidth(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + public GetMetaDataByRatingKeyStream withDisplayTitle(String displayTitle) { + Utils.checkNotNull(displayTitle, "displayTitle"); + this.displayTitle = Optional.ofNullable(displayTitle); + return this; + } + + public GetMetaDataByRatingKeyStream withDisplayTitle(Optional displayTitle) { + Utils.checkNotNull(displayTitle, "displayTitle"); + this.displayTitle = displayTitle; + return this; + } + + public GetMetaDataByRatingKeyStream withExtendedDisplayTitle(String extendedDisplayTitle) { + Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); + this.extendedDisplayTitle = Optional.ofNullable(extendedDisplayTitle); + return this; + } + + public GetMetaDataByRatingKeyStream withExtendedDisplayTitle(Optional extendedDisplayTitle) { + Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); + this.extendedDisplayTitle = extendedDisplayTitle; + return this; + } + + public GetMetaDataByRatingKeyStream withSelected(boolean selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = Optional.ofNullable(selected); + return this; + } + + public GetMetaDataByRatingKeyStream withSelected(Optional selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = selected; + return this; + } + + public GetMetaDataByRatingKeyStream withChannels(int channels) { + Utils.checkNotNull(channels, "channels"); + this.channels = Optional.ofNullable(channels); + return this; + } + + public GetMetaDataByRatingKeyStream withChannels(Optional channels) { + Utils.checkNotNull(channels, "channels"); + this.channels = channels; + return this; + } + + public GetMetaDataByRatingKeyStream withLanguage(String language) { + Utils.checkNotNull(language, "language"); + this.language = Optional.ofNullable(language); + return this; + } + + public GetMetaDataByRatingKeyStream withLanguage(Optional language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + public GetMetaDataByRatingKeyStream withLanguageTag(String languageTag) { + Utils.checkNotNull(languageTag, "languageTag"); + this.languageTag = Optional.ofNullable(languageTag); + return this; + } + + public GetMetaDataByRatingKeyStream withLanguageTag(Optional languageTag) { + Utils.checkNotNull(languageTag, "languageTag"); + this.languageTag = languageTag; + return this; + } + + public GetMetaDataByRatingKeyStream withLanguageCode(String languageCode) { + Utils.checkNotNull(languageCode, "languageCode"); + this.languageCode = Optional.ofNullable(languageCode); + return this; + } + + public GetMetaDataByRatingKeyStream withLanguageCode(Optional languageCode) { + Utils.checkNotNull(languageCode, "languageCode"); + this.languageCode = languageCode; + return this; + } + + public GetMetaDataByRatingKeyStream withSamplingRate(int samplingRate) { + Utils.checkNotNull(samplingRate, "samplingRate"); + this.samplingRate = Optional.ofNullable(samplingRate); + return this; + } + + public GetMetaDataByRatingKeyStream withSamplingRate(Optional samplingRate) { + Utils.checkNotNull(samplingRate, "samplingRate"); + this.samplingRate = samplingRate; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMetaDataByRatingKeyStream other = (GetMetaDataByRatingKeyStream) o; + return + Objects.deepEquals(this.id, other.id) && + Objects.deepEquals(this.streamType, other.streamType) && + Objects.deepEquals(this.default_, other.default_) && + Objects.deepEquals(this.codec, other.codec) && + Objects.deepEquals(this.index, other.index) && + Objects.deepEquals(this.bitrate, other.bitrate) && + Objects.deepEquals(this.bitDepth, other.bitDepth) && + Objects.deepEquals(this.chromaLocation, other.chromaLocation) && + Objects.deepEquals(this.chromaSubsampling, other.chromaSubsampling) && + Objects.deepEquals(this.codedHeight, other.codedHeight) && + Objects.deepEquals(this.codedWidth, other.codedWidth) && + 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.frameRate, other.frameRate) && + Objects.deepEquals(this.hasScalingMatrix, other.hasScalingMatrix) && + 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.streamIdentifier, other.streamIdentifier) && + Objects.deepEquals(this.width, other.width) && + Objects.deepEquals(this.displayTitle, other.displayTitle) && + Objects.deepEquals(this.extendedDisplayTitle, other.extendedDisplayTitle) && + Objects.deepEquals(this.selected, other.selected) && + 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.samplingRate, other.samplingRate); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + streamType, + default_, + codec, + index, + bitrate, + bitDepth, + chromaLocation, + chromaSubsampling, + codedHeight, + codedWidth, + colorPrimaries, + colorRange, + colorSpace, + colorTrc, + frameRate, + hasScalingMatrix, + height, + level, + profile, + refFrames, + scanType, + streamIdentifier, + width, + displayTitle, + extendedDisplayTitle, + selected, + channels, + language, + languageTag, + languageCode, + samplingRate); + } + + @Override + public String toString() { + return Utils.toString(GetMetaDataByRatingKeyStream.class, + "id", id, + "streamType", streamType, + "default_", default_, + "codec", codec, + "index", index, + "bitrate", bitrate, + "bitDepth", bitDepth, + "chromaLocation", chromaLocation, + "chromaSubsampling", chromaSubsampling, + "codedHeight", codedHeight, + "codedWidth", codedWidth, + "colorPrimaries", colorPrimaries, + "colorRange", colorRange, + "colorSpace", colorSpace, + "colorTrc", colorTrc, + "frameRate", frameRate, + "hasScalingMatrix", hasScalingMatrix, + "height", height, + "level", level, + "profile", profile, + "refFrames", refFrames, + "scanType", scanType, + "streamIdentifier", streamIdentifier, + "width", width, + "displayTitle", displayTitle, + "extendedDisplayTitle", extendedDisplayTitle, + "selected", selected, + "channels", channels, + "language", language, + "languageTag", languageTag, + "languageCode", languageCode, + "samplingRate", samplingRate); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional streamType = Optional.empty(); + + private Optional default_ = Optional.empty(); + + private Optional codec = Optional.empty(); + + private Optional index = Optional.empty(); + + private Optional bitrate = Optional.empty(); + + private Optional bitDepth = Optional.empty(); + + private Optional chromaLocation = Optional.empty(); + + private Optional chromaSubsampling = Optional.empty(); + + private Optional codedHeight = Optional.empty(); + + private Optional codedWidth = Optional.empty(); + + private Optional colorPrimaries = Optional.empty(); + + private Optional colorRange = Optional.empty(); + + private Optional colorSpace = Optional.empty(); + + private Optional colorTrc = Optional.empty(); + + private Optional frameRate = Optional.empty(); + + private Optional hasScalingMatrix = 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 streamIdentifier = Optional.empty(); + + private Optional width = Optional.empty(); + + private Optional displayTitle = Optional.empty(); + + private Optional extendedDisplayTitle = Optional.empty(); + + private Optional selected = Optional.empty(); + + private Optional channels = Optional.empty(); + + private Optional language = Optional.empty(); + + private Optional languageTag = Optional.empty(); + + private Optional languageCode = Optional.empty(); + + private Optional samplingRate = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(int id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder streamType(int streamType) { + Utils.checkNotNull(streamType, "streamType"); + this.streamType = Optional.ofNullable(streamType); + return this; + } + + public Builder streamType(Optional streamType) { + Utils.checkNotNull(streamType, "streamType"); + this.streamType = streamType; + return this; + } + + public Builder default_(boolean 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 codec(String codec) { + Utils.checkNotNull(codec, "codec"); + this.codec = Optional.ofNullable(codec); + return this; + } + + public Builder codec(Optional codec) { + Utils.checkNotNull(codec, "codec"); + this.codec = codec; + 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 bitrate(int bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = Optional.ofNullable(bitrate); + return this; + } + + public Builder bitrate(Optional bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = bitrate; + return this; + } + + public Builder bitDepth(int bitDepth) { + Utils.checkNotNull(bitDepth, "bitDepth"); + this.bitDepth = Optional.ofNullable(bitDepth); + return this; + } + + public Builder bitDepth(Optional bitDepth) { + Utils.checkNotNull(bitDepth, "bitDepth"); + this.bitDepth = bitDepth; + return this; + } + + public Builder chromaLocation(String chromaLocation) { + Utils.checkNotNull(chromaLocation, "chromaLocation"); + this.chromaLocation = Optional.ofNullable(chromaLocation); + return this; + } + + public Builder chromaLocation(Optional chromaLocation) { + Utils.checkNotNull(chromaLocation, "chromaLocation"); + this.chromaLocation = chromaLocation; + return this; + } + + public Builder chromaSubsampling(String chromaSubsampling) { + Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); + this.chromaSubsampling = Optional.ofNullable(chromaSubsampling); + return this; + } + + public Builder chromaSubsampling(Optional chromaSubsampling) { + Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); + this.chromaSubsampling = chromaSubsampling; + return this; + } + + public Builder codedHeight(int codedHeight) { + Utils.checkNotNull(codedHeight, "codedHeight"); + this.codedHeight = Optional.ofNullable(codedHeight); + return this; + } + + public Builder codedHeight(Optional codedHeight) { + Utils.checkNotNull(codedHeight, "codedHeight"); + this.codedHeight = codedHeight; + return this; + } + + public Builder codedWidth(int codedWidth) { + Utils.checkNotNull(codedWidth, "codedWidth"); + this.codedWidth = Optional.ofNullable(codedWidth); + return this; + } + + public Builder codedWidth(Optional codedWidth) { + Utils.checkNotNull(codedWidth, "codedWidth"); + this.codedWidth = codedWidth; + return this; + } + + public Builder colorPrimaries(String colorPrimaries) { + Utils.checkNotNull(colorPrimaries, "colorPrimaries"); + this.colorPrimaries = Optional.ofNullable(colorPrimaries); + return this; + } + + public Builder colorPrimaries(Optional colorPrimaries) { + Utils.checkNotNull(colorPrimaries, "colorPrimaries"); + this.colorPrimaries = colorPrimaries; + return this; + } + + public Builder colorRange(String colorRange) { + Utils.checkNotNull(colorRange, "colorRange"); + this.colorRange = Optional.ofNullable(colorRange); + return this; + } + + public Builder colorRange(Optional colorRange) { + Utils.checkNotNull(colorRange, "colorRange"); + this.colorRange = colorRange; + return this; + } + + public Builder colorSpace(String colorSpace) { + Utils.checkNotNull(colorSpace, "colorSpace"); + this.colorSpace = Optional.ofNullable(colorSpace); + return this; + } + + public Builder colorSpace(Optional colorSpace) { + Utils.checkNotNull(colorSpace, "colorSpace"); + this.colorSpace = colorSpace; + return this; + } + + public Builder colorTrc(String colorTrc) { + Utils.checkNotNull(colorTrc, "colorTrc"); + this.colorTrc = Optional.ofNullable(colorTrc); + return this; + } + + public Builder colorTrc(Optional colorTrc) { + Utils.checkNotNull(colorTrc, "colorTrc"); + this.colorTrc = colorTrc; + return this; + } + + public Builder frameRate(int frameRate) { + Utils.checkNotNull(frameRate, "frameRate"); + this.frameRate = Optional.ofNullable(frameRate); + return this; + } + + public Builder frameRate(Optional frameRate) { + Utils.checkNotNull(frameRate, "frameRate"); + this.frameRate = frameRate; + return this; + } + + public Builder hasScalingMatrix(boolean hasScalingMatrix) { + Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); + this.hasScalingMatrix = Optional.ofNullable(hasScalingMatrix); + return this; + } + + public Builder hasScalingMatrix(Optional hasScalingMatrix) { + Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); + this.hasScalingMatrix = hasScalingMatrix; + return this; + } + + public Builder height(int height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + public Builder height(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + public Builder level(int level) { + Utils.checkNotNull(level, "level"); + this.level = Optional.ofNullable(level); + return this; + } + + public Builder level(Optional level) { + Utils.checkNotNull(level, "level"); + this.level = level; + return this; + } + + public Builder profile(String profile) { + Utils.checkNotNull(profile, "profile"); + this.profile = Optional.ofNullable(profile); + return this; + } + + public Builder profile(Optional profile) { + Utils.checkNotNull(profile, "profile"); + this.profile = profile; + return this; + } + + public Builder refFrames(int refFrames) { + Utils.checkNotNull(refFrames, "refFrames"); + this.refFrames = Optional.ofNullable(refFrames); + return this; + } + + public Builder refFrames(Optional refFrames) { + Utils.checkNotNull(refFrames, "refFrames"); + this.refFrames = refFrames; + return this; + } + + public Builder scanType(String scanType) { + Utils.checkNotNull(scanType, "scanType"); + this.scanType = Optional.ofNullable(scanType); + return this; + } + + public Builder scanType(Optional scanType) { + Utils.checkNotNull(scanType, "scanType"); + this.scanType = scanType; + return this; + } + + public Builder streamIdentifier(String streamIdentifier) { + Utils.checkNotNull(streamIdentifier, "streamIdentifier"); + this.streamIdentifier = Optional.ofNullable(streamIdentifier); + return this; + } + + public Builder streamIdentifier(Optional streamIdentifier) { + Utils.checkNotNull(streamIdentifier, "streamIdentifier"); + this.streamIdentifier = streamIdentifier; + return this; + } + + public Builder width(int width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + public Builder width(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + public Builder displayTitle(String displayTitle) { + Utils.checkNotNull(displayTitle, "displayTitle"); + this.displayTitle = Optional.ofNullable(displayTitle); + return this; + } + + public Builder displayTitle(Optional displayTitle) { + Utils.checkNotNull(displayTitle, "displayTitle"); + this.displayTitle = displayTitle; + return this; + } + + public Builder extendedDisplayTitle(String extendedDisplayTitle) { + Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); + this.extendedDisplayTitle = Optional.ofNullable(extendedDisplayTitle); + return this; + } + + public Builder extendedDisplayTitle(Optional extendedDisplayTitle) { + Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); + this.extendedDisplayTitle = extendedDisplayTitle; + return this; + } + + public Builder selected(boolean selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = Optional.ofNullable(selected); + return this; + } + + public Builder selected(Optional selected) { + Utils.checkNotNull(selected, "selected"); + this.selected = selected; + return this; + } + + public Builder channels(int channels) { + Utils.checkNotNull(channels, "channels"); + this.channels = Optional.ofNullable(channels); + return this; + } + + public Builder channels(Optional channels) { + Utils.checkNotNull(channels, "channels"); + this.channels = channels; + return this; + } + + public Builder language(String language) { + Utils.checkNotNull(language, "language"); + this.language = Optional.ofNullable(language); + return this; + } + + public Builder language(Optional language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + public Builder languageTag(String languageTag) { + Utils.checkNotNull(languageTag, "languageTag"); + this.languageTag = Optional.ofNullable(languageTag); + return this; + } + + public Builder languageTag(Optional languageTag) { + Utils.checkNotNull(languageTag, "languageTag"); + this.languageTag = languageTag; + return this; + } + + public Builder languageCode(String languageCode) { + Utils.checkNotNull(languageCode, "languageCode"); + this.languageCode = Optional.ofNullable(languageCode); + return this; + } + + public Builder languageCode(Optional languageCode) { + Utils.checkNotNull(languageCode, "languageCode"); + this.languageCode = languageCode; + return this; + } + + public Builder samplingRate(int samplingRate) { + Utils.checkNotNull(samplingRate, "samplingRate"); + this.samplingRate = Optional.ofNullable(samplingRate); + return this; + } + + public Builder samplingRate(Optional samplingRate) { + Utils.checkNotNull(samplingRate, "samplingRate"); + this.samplingRate = samplingRate; + return this; + } + + public GetMetaDataByRatingKeyStream build() { + return new GetMetaDataByRatingKeyStream( + id, + streamType, + default_, + codec, + index, + bitrate, + bitDepth, + chromaLocation, + chromaSubsampling, + codedHeight, + codedWidth, + colorPrimaries, + colorRange, + colorSpace, + colorTrc, + frameRate, + hasScalingMatrix, + height, + level, + profile, + refFrames, + scanType, + streamIdentifier, + width, + displayTitle, + extendedDisplayTitle, + selected, + channels, + language, + languageTag, + languageCode, + samplingRate); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPinRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPinRequest.java index 5501f5a2..62d2f9cd 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPinRequest.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPinRequest.java @@ -29,6 +29,15 @@ public class GetPinRequest { @SpeakeasyMetadata("queryParam:style=form,explode=true,name=strong") private Optional strong; + /** + * The unique identifier for the client application + * This is used to track the client application and its usage + * (UUID, serial number, or other number unique per device) + * + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier") + private Optional clientID; + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Product") private Optional clientName; @@ -44,16 +53,19 @@ public class GetPinRequest { @JsonCreator public GetPinRequest( Optional strong, + Optional clientID, Optional clientName, Optional deviceName, Optional clientVersion, Optional clientPlatform) { Utils.checkNotNull(strong, "strong"); + Utils.checkNotNull(clientID, "clientID"); Utils.checkNotNull(clientName, "clientName"); Utils.checkNotNull(deviceName, "deviceName"); Utils.checkNotNull(clientVersion, "clientVersion"); Utils.checkNotNull(clientPlatform, "clientPlatform"); this.strong = strong; + this.clientID = clientID; this.clientName = clientName; this.deviceName = deviceName; this.clientVersion = clientVersion; @@ -61,7 +73,7 @@ public class GetPinRequest { } public GetPinRequest() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -75,6 +87,17 @@ public class GetPinRequest { return strong; } + /** + * The unique identifier for the client application + * This is used to track the client application and its usage + * (UUID, serial number, or other number unique per device) + * + */ + @JsonIgnore + public Optional clientID() { + return clientID; + } + @JsonIgnore public Optional clientName() { return clientName; @@ -123,6 +146,30 @@ public class GetPinRequest { return this; } + /** + * The unique identifier for the client application + * This is used to track the client application and its usage + * (UUID, serial number, or other number unique per device) + * + */ + public GetPinRequest withClientID(String clientID) { + Utils.checkNotNull(clientID, "clientID"); + this.clientID = Optional.ofNullable(clientID); + return this; + } + + /** + * The unique identifier for the client application + * This is used to track the client application and its usage + * (UUID, serial number, or other number unique per device) + * + */ + public GetPinRequest withClientID(Optional clientID) { + Utils.checkNotNull(clientID, "clientID"); + this.clientID = clientID; + return this; + } + public GetPinRequest withClientName(String clientName) { Utils.checkNotNull(clientName, "clientName"); this.clientName = Optional.ofNullable(clientName); @@ -182,6 +229,7 @@ public class GetPinRequest { GetPinRequest other = (GetPinRequest) o; return Objects.deepEquals(this.strong, other.strong) && + Objects.deepEquals(this.clientID, other.clientID) && Objects.deepEquals(this.clientName, other.clientName) && Objects.deepEquals(this.deviceName, other.deviceName) && Objects.deepEquals(this.clientVersion, other.clientVersion) && @@ -192,6 +240,7 @@ public class GetPinRequest { public int hashCode() { return Objects.hash( strong, + clientID, clientName, deviceName, clientVersion, @@ -202,6 +251,7 @@ public class GetPinRequest { public String toString() { return Utils.toString(GetPinRequest.class, "strong", strong, + "clientID", clientID, "clientName", clientName, "deviceName", deviceName, "clientVersion", clientVersion, @@ -212,6 +262,8 @@ public class GetPinRequest { private Optional strong; + private Optional clientID = Optional.empty(); + private Optional clientName = Optional.empty(); private Optional deviceName = Optional.empty(); @@ -248,6 +300,30 @@ public class GetPinRequest { return this; } + /** + * The unique identifier for the client application + * This is used to track the client application and its usage + * (UUID, serial number, or other number unique per device) + * + */ + public Builder clientID(String clientID) { + Utils.checkNotNull(clientID, "clientID"); + this.clientID = Optional.ofNullable(clientID); + return this; + } + + /** + * The unique identifier for the client application + * This is used to track the client application and its usage + * (UUID, serial number, or other number unique per device) + * + */ + public Builder clientID(Optional clientID) { + Utils.checkNotNull(clientID, "clientID"); + this.clientID = clientID; + return this; + } + public Builder clientName(String clientName) { Utils.checkNotNull(clientName, "clientName"); this.clientName = Optional.ofNullable(clientName); @@ -301,6 +377,7 @@ public class GetPinRequest { strong = _SINGLETON_VALUE_Strong.value(); } return new GetPinRequest( strong, + clientID, clientName, deviceName, clientVersion, diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedActiveDirection.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedActiveDirection.java new file mode 100644 index 00000000..25848131 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedActiveDirection.java @@ -0,0 +1,28 @@ +/* + * 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; + +/** + * GetRecentlyAddedActiveDirection - The direction of the sort. Can be either `asc` or `desc`. + * + */ +public enum GetRecentlyAddedActiveDirection { + Ascending("asc"), + Descending("desc"); + + @JsonValue + private final String value; + + private GetRecentlyAddedActiveDirection(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedDefaultDirection.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedDefaultDirection.java new file mode 100644 index 00000000..9d1fb1b3 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedDefaultDirection.java @@ -0,0 +1,28 @@ +/* + * 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; + +/** + * GetRecentlyAddedDefaultDirection - The direction of the sort. Can be either `asc` or `desc`. + * + */ +public enum GetRecentlyAddedDefaultDirection { + Ascending("asc"), + Descending("desc"); + + @JsonValue + private final String value; + + private GetRecentlyAddedDefaultDirection(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedField.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedField.java new file mode 100644 index 00000000..d3dbdf5d --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedField.java @@ -0,0 +1,199 @@ +/* + * 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 GetRecentlyAddedField { + + @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 GetRecentlyAddedField( + @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 GetRecentlyAddedField( + 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 GetRecentlyAddedField withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetRecentlyAddedField withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public GetRecentlyAddedField withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetRecentlyAddedField withSubType(String subType) { + Utils.checkNotNull(subType, "subType"); + this.subType = Optional.ofNullable(subType); + return this; + } + + public GetRecentlyAddedField 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; + } + GetRecentlyAddedField other = (GetRecentlyAddedField) 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(GetRecentlyAddedField.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 GetRecentlyAddedField build() { + return new GetRecentlyAddedField( + key, + title, + type, + subType); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedFieldType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedFieldType.java new file mode 100644 index 00000000..77229689 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedFieldType.java @@ -0,0 +1,119 @@ +/* + * 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 GetRecentlyAddedFieldType { + + @JsonProperty("type") + private String type; + + @JsonProperty("Operator") + private List operator; + + @JsonCreator + public GetRecentlyAddedFieldType( + @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 GetRecentlyAddedFieldType withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetRecentlyAddedFieldType 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; + } + GetRecentlyAddedFieldType other = (GetRecentlyAddedFieldType) 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(GetRecentlyAddedFieldType.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 GetRecentlyAddedFieldType build() { + return new GetRecentlyAddedFieldType( + type, + operator); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedFilter.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedFilter.java new file mode 100644 index 00000000..7edff958 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedFilter.java @@ -0,0 +1,205 @@ +/* + * 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 GetRecentlyAddedFilter { + + @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 GetRecentlyAddedFilter( + @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 GetRecentlyAddedFilter withFilter(String filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public GetRecentlyAddedFilter withFilterType(String filterType) { + Utils.checkNotNull(filterType, "filterType"); + this.filterType = filterType; + return this; + } + + public GetRecentlyAddedFilter withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetRecentlyAddedFilter withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public GetRecentlyAddedFilter 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; + } + GetRecentlyAddedFilter other = (GetRecentlyAddedFilter) 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(GetRecentlyAddedFilter.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 GetRecentlyAddedFilter build() { + return new GetRecentlyAddedFilter( + filter, + filterType, + key, + title, + type); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedHubsResponseType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedHubsResponseType.java new file mode 100644 index 00000000..4f250a5c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedHubsResponseType.java @@ -0,0 +1,26 @@ +/* + * 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; + +public enum GetRecentlyAddedHubsResponseType { + COVER_POSTER("coverPoster"), + BACKGROUND("background"), + SNAPSHOT("snapshot"), + CLEAR_LOGO("clearLogo"); + + @JsonValue + private final String value; + + private GetRecentlyAddedHubsResponseType(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedHubsType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedHubsType.java new file mode 100644 index 00000000..3f58a3ff --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedHubsType.java @@ -0,0 +1,30 @@ +/* + * 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; + +/** + * GetRecentlyAddedHubsType - The type of media content + * + */ +public enum GetRecentlyAddedHubsType { + Movie("movie"), + TvShow("show"), + Season("season"), + Episode("episode"); + + @JsonValue + private final String value; + + private GetRecentlyAddedHubsType(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedImage.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedImage.java new file mode 100644 index 00000000..a6078384 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedImage.java @@ -0,0 +1,147 @@ +/* + * 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 GetRecentlyAddedImage { + + @JsonProperty("alt") + private String alt; + + @JsonProperty("type") + private GetRecentlyAddedHubsResponseType type; + + @JsonProperty("url") + private String url; + + @JsonCreator + public GetRecentlyAddedImage( + @JsonProperty("alt") String alt, + @JsonProperty("type") GetRecentlyAddedHubsResponseType type, + @JsonProperty("url") String url) { + Utils.checkNotNull(alt, "alt"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(url, "url"); + this.alt = alt; + this.type = type; + this.url = url; + } + + @JsonIgnore + public String alt() { + return alt; + } + + @JsonIgnore + public GetRecentlyAddedHubsResponseType type() { + return type; + } + + @JsonIgnore + public String url() { + return url; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetRecentlyAddedImage withAlt(String alt) { + Utils.checkNotNull(alt, "alt"); + this.alt = alt; + return this; + } + + public GetRecentlyAddedImage withType(GetRecentlyAddedHubsResponseType type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetRecentlyAddedImage withUrl(String url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetRecentlyAddedImage other = (GetRecentlyAddedImage) o; + return + Objects.deepEquals(this.alt, other.alt) && + Objects.deepEquals(this.type, other.type) && + Objects.deepEquals(this.url, other.url); + } + + @Override + public int hashCode() { + return Objects.hash( + alt, + type, + url); + } + + @Override + public String toString() { + return Utils.toString(GetRecentlyAddedImage.class, + "alt", alt, + "type", type, + "url", url); + } + + public final static class Builder { + + private String alt; + + private GetRecentlyAddedHubsResponseType type; + + private String url; + + private Builder() { + // force use of static builder() method + } + + public Builder alt(String alt) { + Utils.checkNotNull(alt, "alt"); + this.alt = alt; + return this; + } + + public Builder type(GetRecentlyAddedHubsResponseType type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Builder url(String url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + public GetRecentlyAddedImage build() { + return new GetRecentlyAddedImage( + alt, + type, + url); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryCountry.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryCountry.java new file mode 100644 index 00000000..4e1adb57 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryCountry.java @@ -0,0 +1,109 @@ +/* + * 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 GetRecentlyAddedLibraryCountry { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + @JsonCreator + public GetRecentlyAddedLibraryCountry( + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + } + + public GetRecentlyAddedLibraryCountry() { + this(Optional.empty()); + } + + @JsonIgnore + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetRecentlyAddedLibraryCountry withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public GetRecentlyAddedLibraryCountry 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; + } + GetRecentlyAddedLibraryCountry other = (GetRecentlyAddedLibraryCountry) o; + return + Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return Objects.hash( + tag); + } + + @Override + public String toString() { + return Utils.toString(GetRecentlyAddedLibraryCountry.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 GetRecentlyAddedLibraryCountry build() { + return new GetRecentlyAddedLibraryCountry( + tag); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryDirector.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryDirector.java new file mode 100644 index 00000000..fde2f1ba --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryDirector.java @@ -0,0 +1,109 @@ +/* + * 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 GetRecentlyAddedLibraryDirector { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + @JsonCreator + public GetRecentlyAddedLibraryDirector( + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + } + + public GetRecentlyAddedLibraryDirector() { + this(Optional.empty()); + } + + @JsonIgnore + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetRecentlyAddedLibraryDirector withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public GetRecentlyAddedLibraryDirector 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; + } + GetRecentlyAddedLibraryDirector other = (GetRecentlyAddedLibraryDirector) o; + return + Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return Objects.hash( + tag); + } + + @Override + public String toString() { + return Utils.toString(GetRecentlyAddedLibraryDirector.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 GetRecentlyAddedLibraryDirector build() { + return new GetRecentlyAddedLibraryDirector( + tag); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryFilter.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryFilter.java new file mode 100644 index 00000000..cc53ed19 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryFilter.java @@ -0,0 +1,205 @@ +/* + * 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 GetRecentlyAddedLibraryFilter { + + @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 GetRecentlyAddedLibraryFilter( + @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 GetRecentlyAddedLibraryFilter withFilter(String filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public GetRecentlyAddedLibraryFilter withFilterType(String filterType) { + Utils.checkNotNull(filterType, "filterType"); + this.filterType = filterType; + return this; + } + + public GetRecentlyAddedLibraryFilter withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetRecentlyAddedLibraryFilter withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public GetRecentlyAddedLibraryFilter 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; + } + GetRecentlyAddedLibraryFilter other = (GetRecentlyAddedLibraryFilter) 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(GetRecentlyAddedLibraryFilter.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 GetRecentlyAddedLibraryFilter build() { + return new GetRecentlyAddedLibraryFilter( + filter, + filterType, + key, + title, + type); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryGenre.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryGenre.java new file mode 100644 index 00000000..acab5878 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryGenre.java @@ -0,0 +1,109 @@ +/* + * 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 GetRecentlyAddedLibraryGenre { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + @JsonCreator + public GetRecentlyAddedLibraryGenre( + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + } + + public GetRecentlyAddedLibraryGenre() { + this(Optional.empty()); + } + + @JsonIgnore + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetRecentlyAddedLibraryGenre withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public GetRecentlyAddedLibraryGenre 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; + } + GetRecentlyAddedLibraryGenre other = (GetRecentlyAddedLibraryGenre) o; + return + Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return Objects.hash( + tag); + } + + @Override + public String toString() { + return Utils.toString(GetRecentlyAddedLibraryGenre.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 GetRecentlyAddedLibraryGenre build() { + return new GetRecentlyAddedLibraryGenre( + tag); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryMedia.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryMedia.java new file mode 100644 index 00000000..4915cd9c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryMedia.java @@ -0,0 +1,744 @@ +/* + * 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.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + + +public class GetRecentlyAddedLibraryMedia { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("bitrate") + private Optional bitrate; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("width") + private Optional width; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("height") + private Optional height; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("aspectRatio") + private Optional aspectRatio; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioChannels") + private Optional audioChannels; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioCodec") + private Optional audioCodec; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoCodec") + private Optional videoCodec; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoResolution") + private Optional videoResolution; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("container") + private Optional container; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoFrameRate") + private Optional videoFrameRate; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("optimizedForStreaming") + private Optional optimizedForStreaming; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("has64bitOffsets") + private Optional has64bitOffsets; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoProfile") + private Optional videoProfile; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Part") + private Optional> part; + + @JsonCreator + public GetRecentlyAddedLibraryMedia( + @JsonProperty("id") Optional id, + @JsonProperty("duration") Optional duration, + @JsonProperty("bitrate") Optional bitrate, + @JsonProperty("width") Optional width, + @JsonProperty("height") Optional height, + @JsonProperty("aspectRatio") Optional aspectRatio, + @JsonProperty("audioChannels") Optional audioChannels, + @JsonProperty("audioCodec") Optional audioCodec, + @JsonProperty("videoCodec") Optional videoCodec, + @JsonProperty("videoResolution") Optional videoResolution, + @JsonProperty("container") Optional container, + @JsonProperty("videoFrameRate") Optional videoFrameRate, + @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, + @JsonProperty("has64bitOffsets") Optional has64bitOffsets, + @JsonProperty("videoProfile") Optional videoProfile, + @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(audioChannels, "audioChannels"); + Utils.checkNotNull(audioCodec, "audioCodec"); + Utils.checkNotNull(videoCodec, "videoCodec"); + Utils.checkNotNull(videoResolution, "videoResolution"); + Utils.checkNotNull(container, "container"); + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + Utils.checkNotNull(videoProfile, "videoProfile"); + Utils.checkNotNull(part, "part"); + this.id = id; + this.duration = duration; + this.bitrate = bitrate; + this.width = width; + this.height = height; + this.aspectRatio = aspectRatio; + this.audioChannels = audioChannels; + this.audioCodec = audioCodec; + this.videoCodec = videoCodec; + this.videoResolution = videoResolution; + this.container = container; + this.videoFrameRate = videoFrameRate; + this.optimizedForStreaming = optimizedForStreaming; + this.has64bitOffsets = has64bitOffsets; + this.videoProfile = videoProfile; + this.part = part; + } + + public GetRecentlyAddedLibraryMedia() { + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), 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 Optional id() { + return id; + } + + @JsonIgnore + public Optional duration() { + return duration; + } + + @JsonIgnore + public Optional bitrate() { + return bitrate; + } + + @JsonIgnore + public Optional width() { + return width; + } + + @JsonIgnore + public Optional height() { + return height; + } + + @JsonIgnore + public Optional aspectRatio() { + return aspectRatio; + } + + @JsonIgnore + public Optional audioChannels() { + return audioChannels; + } + + @JsonIgnore + public Optional audioCodec() { + return audioCodec; + } + + @JsonIgnore + public Optional videoCodec() { + return videoCodec; + } + + @JsonIgnore + public Optional videoResolution() { + return videoResolution; + } + + @JsonIgnore + public Optional container() { + return container; + } + + @JsonIgnore + public Optional videoFrameRate() { + return videoFrameRate; + } + + @JsonIgnore + public Optional optimizedForStreaming() { + return optimizedForStreaming; + } + + @JsonIgnore + public Optional has64bitOffsets() { + return has64bitOffsets; + } + + @JsonIgnore + public Optional videoProfile() { + return videoProfile; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> part() { + return (Optional>) part; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetRecentlyAddedLibraryMedia withId(double id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public GetRecentlyAddedLibraryMedia withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetRecentlyAddedLibraryMedia withDuration(double duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public GetRecentlyAddedLibraryMedia withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public GetRecentlyAddedLibraryMedia withBitrate(double bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = Optional.ofNullable(bitrate); + return this; + } + + public GetRecentlyAddedLibraryMedia withBitrate(Optional bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = bitrate; + return this; + } + + public GetRecentlyAddedLibraryMedia withWidth(double width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + public GetRecentlyAddedLibraryMedia withWidth(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + public GetRecentlyAddedLibraryMedia withHeight(double height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + public GetRecentlyAddedLibraryMedia withHeight(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + public GetRecentlyAddedLibraryMedia withAspectRatio(double aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = Optional.ofNullable(aspectRatio); + return this; + } + + public GetRecentlyAddedLibraryMedia withAspectRatio(Optional aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = aspectRatio; + return this; + } + + public GetRecentlyAddedLibraryMedia withAudioChannels(double audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = Optional.ofNullable(audioChannels); + return this; + } + + public GetRecentlyAddedLibraryMedia withAudioChannels(Optional audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = audioChannels; + return this; + } + + public GetRecentlyAddedLibraryMedia withAudioCodec(String audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = Optional.ofNullable(audioCodec); + return this; + } + + public GetRecentlyAddedLibraryMedia withAudioCodec(Optional audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = audioCodec; + return this; + } + + public GetRecentlyAddedLibraryMedia withVideoCodec(String videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = Optional.ofNullable(videoCodec); + return this; + } + + public GetRecentlyAddedLibraryMedia withVideoCodec(Optional videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = videoCodec; + return this; + } + + public GetRecentlyAddedLibraryMedia withVideoResolution(double videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = Optional.ofNullable(videoResolution); + return this; + } + + public GetRecentlyAddedLibraryMedia withVideoResolution(Optional videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = videoResolution; + return this; + } + + public GetRecentlyAddedLibraryMedia withContainer(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public GetRecentlyAddedLibraryMedia withContainer(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public GetRecentlyAddedLibraryMedia withVideoFrameRate(String videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = Optional.ofNullable(videoFrameRate); + return this; + } + + public GetRecentlyAddedLibraryMedia withVideoFrameRate(Optional videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = videoFrameRate; + return this; + } + + public GetRecentlyAddedLibraryMedia withOptimizedForStreaming(double optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); + return this; + } + + public GetRecentlyAddedLibraryMedia withOptimizedForStreaming(Optional optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = optimizedForStreaming; + return this; + } + + public GetRecentlyAddedLibraryMedia withHas64bitOffsets(boolean has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); + return this; + } + + public GetRecentlyAddedLibraryMedia withHas64bitOffsets(Optional has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = has64bitOffsets; + return this; + } + + public GetRecentlyAddedLibraryMedia withVideoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + public GetRecentlyAddedLibraryMedia withVideoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + public GetRecentlyAddedLibraryMedia withPart(List part) { + Utils.checkNotNull(part, "part"); + this.part = Optional.ofNullable(part); + return this; + } + + public GetRecentlyAddedLibraryMedia withPart(Optional> part) { + Utils.checkNotNull(part, "part"); + this.part = part; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetRecentlyAddedLibraryMedia other = (GetRecentlyAddedLibraryMedia) o; + return + Objects.deepEquals(this.id, other.id) && + Objects.deepEquals(this.duration, other.duration) && + Objects.deepEquals(this.bitrate, other.bitrate) && + Objects.deepEquals(this.width, other.width) && + Objects.deepEquals(this.height, other.height) && + Objects.deepEquals(this.aspectRatio, other.aspectRatio) && + Objects.deepEquals(this.audioChannels, other.audioChannels) && + Objects.deepEquals(this.audioCodec, other.audioCodec) && + Objects.deepEquals(this.videoCodec, other.videoCodec) && + Objects.deepEquals(this.videoResolution, other.videoResolution) && + Objects.deepEquals(this.container, other.container) && + Objects.deepEquals(this.videoFrameRate, other.videoFrameRate) && + Objects.deepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && + Objects.deepEquals(this.has64bitOffsets, other.has64bitOffsets) && + Objects.deepEquals(this.videoProfile, other.videoProfile) && + Objects.deepEquals(this.part, other.part); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + duration, + bitrate, + width, + height, + aspectRatio, + audioChannels, + audioCodec, + videoCodec, + videoResolution, + container, + videoFrameRate, + optimizedForStreaming, + has64bitOffsets, + videoProfile, + part); + } + + @Override + public String toString() { + return Utils.toString(GetRecentlyAddedLibraryMedia.class, + "id", id, + "duration", duration, + "bitrate", bitrate, + "width", width, + "height", height, + "aspectRatio", aspectRatio, + "audioChannels", audioChannels, + "audioCodec", audioCodec, + "videoCodec", videoCodec, + "videoResolution", videoResolution, + "container", container, + "videoFrameRate", videoFrameRate, + "optimizedForStreaming", optimizedForStreaming, + "has64bitOffsets", has64bitOffsets, + "videoProfile", videoProfile, + "part", part); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional bitrate = Optional.empty(); + + private Optional width = Optional.empty(); + + private Optional height = Optional.empty(); + + private Optional aspectRatio = Optional.empty(); + + private Optional audioChannels = Optional.empty(); + + private Optional audioCodec = Optional.empty(); + + private Optional videoCodec = Optional.empty(); + + private Optional videoResolution = Optional.empty(); + + private Optional container = Optional.empty(); + + private Optional videoFrameRate = Optional.empty(); + + private Optional optimizedForStreaming = Optional.empty(); + + private Optional has64bitOffsets = Optional.empty(); + + private Optional videoProfile = Optional.empty(); + + private Optional> part = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(double id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder duration(double 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; + } + + public Builder bitrate(double bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = Optional.ofNullable(bitrate); + return this; + } + + public Builder bitrate(Optional bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = bitrate; + return this; + } + + public Builder width(double width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + public Builder width(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + public Builder height(double height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + public Builder height(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + public Builder aspectRatio(double aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = Optional.ofNullable(aspectRatio); + return this; + } + + public Builder aspectRatio(Optional aspectRatio) { + Utils.checkNotNull(aspectRatio, "aspectRatio"); + this.aspectRatio = aspectRatio; + return this; + } + + public Builder audioChannels(double audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = Optional.ofNullable(audioChannels); + return this; + } + + public Builder audioChannels(Optional audioChannels) { + Utils.checkNotNull(audioChannels, "audioChannels"); + this.audioChannels = audioChannels; + return this; + } + + public Builder audioCodec(String audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = Optional.ofNullable(audioCodec); + return this; + } + + public Builder audioCodec(Optional audioCodec) { + Utils.checkNotNull(audioCodec, "audioCodec"); + this.audioCodec = audioCodec; + return this; + } + + public Builder videoCodec(String videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = Optional.ofNullable(videoCodec); + return this; + } + + public Builder videoCodec(Optional videoCodec) { + Utils.checkNotNull(videoCodec, "videoCodec"); + this.videoCodec = videoCodec; + return this; + } + + public Builder videoResolution(double videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = Optional.ofNullable(videoResolution); + return this; + } + + public Builder videoResolution(Optional videoResolution) { + Utils.checkNotNull(videoResolution, "videoResolution"); + this.videoResolution = videoResolution; + return this; + } + + public Builder container(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public Builder container(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public Builder videoFrameRate(String videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = Optional.ofNullable(videoFrameRate); + return this; + } + + public Builder videoFrameRate(Optional videoFrameRate) { + Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + this.videoFrameRate = videoFrameRate; + return this; + } + + public Builder optimizedForStreaming(double optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); + return this; + } + + public Builder optimizedForStreaming(Optional optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = optimizedForStreaming; + return this; + } + + public Builder has64bitOffsets(boolean has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); + return this; + } + + public Builder has64bitOffsets(Optional has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = has64bitOffsets; + 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 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 GetRecentlyAddedLibraryMedia build() { + return new GetRecentlyAddedLibraryMedia( + id, + duration, + bitrate, + width, + height, + aspectRatio, + audioChannels, + audioCodec, + videoCodec, + videoResolution, + container, + videoFrameRate, + optimizedForStreaming, + has64bitOffsets, + videoProfile, + part); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryMediaContainer.java new file mode 100644 index 00000000..f5dcedcc --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryMediaContainer.java @@ -0,0 +1,456 @@ +/* + * 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.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GetRecentlyAddedLibraryMediaContainer - The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. + * + */ + +public class GetRecentlyAddedLibraryMediaContainer { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Type") + private Optional> type; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("FieldType") + private Optional> fieldType; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowSync") + private Optional allowSync; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mediaTagPrefix") + private Optional mediaTagPrefix; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mediaTagVersion") + private Optional mediaTagVersion; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mixedParents") + private Optional mixedParents; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Metadata") + private Optional> metadata; + + @JsonCreator + public GetRecentlyAddedLibraryMediaContainer( + @JsonProperty("Type") Optional> type, + @JsonProperty("FieldType") Optional> fieldType, + @JsonProperty("size") Optional size, + @JsonProperty("allowSync") Optional allowSync, + @JsonProperty("identifier") Optional identifier, + @JsonProperty("mediaTagPrefix") Optional mediaTagPrefix, + @JsonProperty("mediaTagVersion") Optional mediaTagVersion, + @JsonProperty("mixedParents") Optional mixedParents, + @JsonProperty("Metadata") Optional> metadata) { + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(fieldType, "fieldType"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(allowSync, "allowSync"); + Utils.checkNotNull(identifier, "identifier"); + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + Utils.checkNotNull(mixedParents, "mixedParents"); + Utils.checkNotNull(metadata, "metadata"); + this.type = type; + this.fieldType = fieldType; + this.size = size; + this.allowSync = allowSync; + this.identifier = identifier; + this.mediaTagPrefix = mediaTagPrefix; + this.mediaTagVersion = mediaTagVersion; + this.mixedParents = mixedParents; + this.metadata = metadata; + } + + public GetRecentlyAddedLibraryMediaContainer() { + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), 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; + } + + @JsonIgnore + public Optional size() { + return size; + } + + @JsonIgnore + public Optional allowSync() { + return allowSync; + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + @JsonIgnore + public Optional mediaTagPrefix() { + return mediaTagPrefix; + } + + @JsonIgnore + public Optional mediaTagVersion() { + return mediaTagVersion; + } + + @JsonIgnore + public Optional mixedParents() { + return mixedParents; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> metadata() { + return (Optional>) metadata; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetRecentlyAddedLibraryMediaContainer withType(List type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public GetRecentlyAddedLibraryMediaContainer withType(Optional> type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetRecentlyAddedLibraryMediaContainer withFieldType(List fieldType) { + Utils.checkNotNull(fieldType, "fieldType"); + this.fieldType = Optional.ofNullable(fieldType); + return this; + } + + public GetRecentlyAddedLibraryMediaContainer withFieldType(Optional> fieldType) { + Utils.checkNotNull(fieldType, "fieldType"); + this.fieldType = fieldType; + return this; + } + + public GetRecentlyAddedLibraryMediaContainer withSize(double size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetRecentlyAddedLibraryMediaContainer withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetRecentlyAddedLibraryMediaContainer withAllowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public GetRecentlyAddedLibraryMediaContainer withAllowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public GetRecentlyAddedLibraryMediaContainer withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + public GetRecentlyAddedLibraryMediaContainer withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public GetRecentlyAddedLibraryMediaContainer withMediaTagPrefix(String mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = Optional.ofNullable(mediaTagPrefix); + return this; + } + + public GetRecentlyAddedLibraryMediaContainer withMediaTagPrefix(Optional mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = mediaTagPrefix; + return this; + } + + public GetRecentlyAddedLibraryMediaContainer withMediaTagVersion(double mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = Optional.ofNullable(mediaTagVersion); + return this; + } + + public GetRecentlyAddedLibraryMediaContainer withMediaTagVersion(Optional mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = mediaTagVersion; + return this; + } + + public GetRecentlyAddedLibraryMediaContainer withMixedParents(boolean mixedParents) { + Utils.checkNotNull(mixedParents, "mixedParents"); + this.mixedParents = Optional.ofNullable(mixedParents); + return this; + } + + public GetRecentlyAddedLibraryMediaContainer withMixedParents(Optional mixedParents) { + Utils.checkNotNull(mixedParents, "mixedParents"); + this.mixedParents = mixedParents; + return this; + } + + public GetRecentlyAddedLibraryMediaContainer withMetadata(List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + public GetRecentlyAddedLibraryMediaContainer withMetadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetRecentlyAddedLibraryMediaContainer other = (GetRecentlyAddedLibraryMediaContainer) o; + return + Objects.deepEquals(this.type, other.type) && + Objects.deepEquals(this.fieldType, other.fieldType) && + Objects.deepEquals(this.size, other.size) && + Objects.deepEquals(this.allowSync, other.allowSync) && + Objects.deepEquals(this.identifier, other.identifier) && + Objects.deepEquals(this.mediaTagPrefix, other.mediaTagPrefix) && + Objects.deepEquals(this.mediaTagVersion, other.mediaTagVersion) && + Objects.deepEquals(this.mixedParents, other.mixedParents) && + Objects.deepEquals(this.metadata, other.metadata); + } + + @Override + public int hashCode() { + return Objects.hash( + type, + fieldType, + size, + allowSync, + identifier, + mediaTagPrefix, + mediaTagVersion, + mixedParents, + metadata); + } + + @Override + public String toString() { + return Utils.toString(GetRecentlyAddedLibraryMediaContainer.class, + "type", type, + "fieldType", fieldType, + "size", size, + "allowSync", allowSync, + "identifier", identifier, + "mediaTagPrefix", mediaTagPrefix, + "mediaTagVersion", mediaTagVersion, + "mixedParents", mixedParents, + "metadata", metadata); + } + + public final static class Builder { + + private Optional> type = Optional.empty(); + + private Optional> fieldType = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional allowSync = Optional.empty(); + + private Optional identifier = Optional.empty(); + + private Optional mediaTagPrefix = Optional.empty(); + + private Optional mediaTagVersion = Optional.empty(); + + private Optional mixedParents = Optional.empty(); + + private Optional> metadata = Optional.empty(); + + private Builder() { + // 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; + } + + public Builder size(double size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder allowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public Builder allowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public Builder identifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + public Builder identifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public Builder mediaTagPrefix(String mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = Optional.ofNullable(mediaTagPrefix); + return this; + } + + public Builder mediaTagPrefix(Optional mediaTagPrefix) { + Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); + this.mediaTagPrefix = mediaTagPrefix; + return this; + } + + public Builder mediaTagVersion(double mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = Optional.ofNullable(mediaTagVersion); + return this; + } + + public Builder mediaTagVersion(Optional mediaTagVersion) { + Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); + this.mediaTagVersion = mediaTagVersion; + return this; + } + + public Builder mixedParents(boolean mixedParents) { + Utils.checkNotNull(mixedParents, "mixedParents"); + this.mixedParents = Optional.ofNullable(mixedParents); + return this; + } + + public Builder mixedParents(Optional mixedParents) { + Utils.checkNotNull(mixedParents, "mixedParents"); + this.mixedParents = mixedParents; + return this; + } + + 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; + } + + public GetRecentlyAddedLibraryMediaContainer build() { + return new GetRecentlyAddedLibraryMediaContainer( + type, + fieldType, + size, + allowSync, + identifier, + mediaTagPrefix, + mediaTagVersion, + mixedParents, + metadata); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryMetadata.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryMetadata.java new file mode 100644 index 00000000..a1ddcfc7 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryMetadata.java @@ -0,0 +1,1422 @@ +/* + * 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.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + + +public class GetRecentlyAddedLibraryMetadata { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowSync") + private Optional allowSync; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionID") + private Optional librarySectionID; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionTitle") + private Optional librarySectionTitle; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("librarySectionUUID") + private Optional librarySectionUUID; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingKey") + private Optional ratingKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("guid") + private Optional guid; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("studio") + private Optional studio; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private Optional title; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("contentRating") + private Optional contentRating; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("summary") + private Optional summary; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("rating") + private Optional rating; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audienceRating") + private Optional audienceRating; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("year") + private Optional year; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tagline") + private Optional tagline; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("thumb") + private Optional thumb; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("art") + private Optional art; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("originallyAvailableAt") + private Optional originallyAvailableAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("addedAt") + private Optional addedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private Optional updatedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audienceRatingImage") + private Optional audienceRatingImage; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("chapterSource") + private Optional chapterSource; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("primaryExtraKey") + private Optional primaryExtraKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ratingImage") + private Optional ratingImage; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Media") + private Optional> media; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Genre") + private Optional> genre; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Director") + private Optional> director; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Writer") + private Optional> writer; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Country") + private Optional> country; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Role") + private Optional> role; + + @JsonCreator + public GetRecentlyAddedLibraryMetadata( + @JsonProperty("allowSync") Optional allowSync, + @JsonProperty("librarySectionID") Optional librarySectionID, + @JsonProperty("librarySectionTitle") Optional librarySectionTitle, + @JsonProperty("librarySectionUUID") Optional librarySectionUUID, + @JsonProperty("ratingKey") Optional ratingKey, + @JsonProperty("key") Optional key, + @JsonProperty("guid") Optional guid, + @JsonProperty("studio") Optional studio, + @JsonProperty("type") Optional type, + @JsonProperty("title") Optional title, + @JsonProperty("contentRating") Optional contentRating, + @JsonProperty("summary") Optional summary, + @JsonProperty("rating") Optional rating, + @JsonProperty("audienceRating") Optional audienceRating, + @JsonProperty("year") Optional year, + @JsonProperty("tagline") Optional tagline, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("art") Optional art, + @JsonProperty("duration") Optional duration, + @JsonProperty("originallyAvailableAt") Optional originallyAvailableAt, + @JsonProperty("addedAt") Optional addedAt, + @JsonProperty("updatedAt") Optional updatedAt, + @JsonProperty("audienceRatingImage") Optional audienceRatingImage, + @JsonProperty("chapterSource") Optional chapterSource, + @JsonProperty("primaryExtraKey") Optional primaryExtraKey, + @JsonProperty("ratingImage") Optional ratingImage, + @JsonProperty("Media") Optional> media, + @JsonProperty("Genre") Optional> genre, + @JsonProperty("Director") Optional> director, + @JsonProperty("Writer") Optional> writer, + @JsonProperty("Country") Optional> country, + @JsonProperty("Role") Optional> role) { + Utils.checkNotNull(allowSync, "allowSync"); + Utils.checkNotNull(librarySectionID, "librarySectionID"); + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + Utils.checkNotNull(ratingKey, "ratingKey"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(guid, "guid"); + Utils.checkNotNull(studio, "studio"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(contentRating, "contentRating"); + Utils.checkNotNull(summary, "summary"); + Utils.checkNotNull(rating, "rating"); + Utils.checkNotNull(audienceRating, "audienceRating"); + Utils.checkNotNull(year, "year"); + Utils.checkNotNull(tagline, "tagline"); + Utils.checkNotNull(thumb, "thumb"); + Utils.checkNotNull(art, "art"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + Utils.checkNotNull(addedAt, "addedAt"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + Utils.checkNotNull(chapterSource, "chapterSource"); + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + Utils.checkNotNull(ratingImage, "ratingImage"); + Utils.checkNotNull(media, "media"); + Utils.checkNotNull(genre, "genre"); + Utils.checkNotNull(director, "director"); + Utils.checkNotNull(writer, "writer"); + Utils.checkNotNull(country, "country"); + Utils.checkNotNull(role, "role"); + this.allowSync = allowSync; + this.librarySectionID = librarySectionID; + this.librarySectionTitle = librarySectionTitle; + this.librarySectionUUID = librarySectionUUID; + this.ratingKey = ratingKey; + this.key = key; + this.guid = guid; + this.studio = studio; + this.type = type; + this.title = title; + this.contentRating = contentRating; + this.summary = summary; + this.rating = rating; + this.audienceRating = audienceRating; + this.year = year; + this.tagline = tagline; + this.thumb = thumb; + this.art = art; + this.duration = duration; + this.originallyAvailableAt = originallyAvailableAt; + this.addedAt = addedAt; + this.updatedAt = updatedAt; + this.audienceRatingImage = audienceRatingImage; + this.chapterSource = chapterSource; + this.primaryExtraKey = primaryExtraKey; + this.ratingImage = ratingImage; + this.media = media; + this.genre = genre; + this.director = director; + this.writer = writer; + this.country = country; + this.role = role; + } + + public GetRecentlyAddedLibraryMetadata() { + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), 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 Optional allowSync() { + return allowSync; + } + + @JsonIgnore + public Optional librarySectionID() { + return librarySectionID; + } + + @JsonIgnore + public Optional librarySectionTitle() { + return librarySectionTitle; + } + + @JsonIgnore + public Optional librarySectionUUID() { + return librarySectionUUID; + } + + @JsonIgnore + public Optional ratingKey() { + return ratingKey; + } + + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional guid() { + return guid; + } + + @JsonIgnore + public Optional studio() { + return studio; + } + + @JsonIgnore + public Optional type() { + return type; + } + + @JsonIgnore + public Optional title() { + return title; + } + + @JsonIgnore + public Optional contentRating() { + return contentRating; + } + + @JsonIgnore + public Optional summary() { + return summary; + } + + @JsonIgnore + public Optional rating() { + return rating; + } + + @JsonIgnore + public Optional audienceRating() { + return audienceRating; + } + + @JsonIgnore + public Optional year() { + return year; + } + + @JsonIgnore + public Optional tagline() { + return tagline; + } + + @JsonIgnore + public Optional thumb() { + return thumb; + } + + @JsonIgnore + public Optional art() { + return art; + } + + @JsonIgnore + public Optional duration() { + return duration; + } + + @JsonIgnore + public Optional originallyAvailableAt() { + return originallyAvailableAt; + } + + @JsonIgnore + public Optional addedAt() { + return addedAt; + } + + @JsonIgnore + public Optional updatedAt() { + return updatedAt; + } + + @JsonIgnore + public Optional audienceRatingImage() { + return audienceRatingImage; + } + + @JsonIgnore + public Optional chapterSource() { + return chapterSource; + } + + @JsonIgnore + public Optional primaryExtraKey() { + return primaryExtraKey; + } + + @JsonIgnore + public Optional ratingImage() { + return ratingImage; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> media() { + return (Optional>) media; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> genre() { + return (Optional>) genre; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> director() { + return (Optional>) director; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> writer() { + return (Optional>) writer; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> country() { + return (Optional>) country; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> role() { + return (Optional>) role; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetRecentlyAddedLibraryMetadata withAllowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public GetRecentlyAddedLibraryMetadata withAllowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public GetRecentlyAddedLibraryMetadata withLibrarySectionID(double librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + public GetRecentlyAddedLibraryMetadata withLibrarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + public GetRecentlyAddedLibraryMetadata withLibrarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + public GetRecentlyAddedLibraryMetadata withLibrarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + public GetRecentlyAddedLibraryMetadata withLibrarySectionUUID(String librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); + return this; + } + + public GetRecentlyAddedLibraryMetadata withLibrarySectionUUID(Optional librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = librarySectionUUID; + return this; + } + + public GetRecentlyAddedLibraryMetadata withRatingKey(double ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public GetRecentlyAddedLibraryMetadata withRatingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public GetRecentlyAddedLibraryMetadata withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public GetRecentlyAddedLibraryMetadata withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetRecentlyAddedLibraryMetadata withGuid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public GetRecentlyAddedLibraryMetadata withGuid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public GetRecentlyAddedLibraryMetadata withStudio(String studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = Optional.ofNullable(studio); + return this; + } + + public GetRecentlyAddedLibraryMetadata withStudio(Optional studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = studio; + return this; + } + + public GetRecentlyAddedLibraryMetadata withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public GetRecentlyAddedLibraryMetadata withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetRecentlyAddedLibraryMetadata withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public GetRecentlyAddedLibraryMetadata withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public GetRecentlyAddedLibraryMetadata withContentRating(String contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = Optional.ofNullable(contentRating); + return this; + } + + public GetRecentlyAddedLibraryMetadata withContentRating(Optional contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = contentRating; + return this; + } + + public GetRecentlyAddedLibraryMetadata withSummary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public GetRecentlyAddedLibraryMetadata withSummary(Optional summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public GetRecentlyAddedLibraryMetadata withRating(double rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = Optional.ofNullable(rating); + return this; + } + + public GetRecentlyAddedLibraryMetadata withRating(Optional rating) { + Utils.checkNotNull(rating, "rating"); + this.rating = rating; + return this; + } + + public GetRecentlyAddedLibraryMetadata withAudienceRating(double audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = Optional.ofNullable(audienceRating); + return this; + } + + public GetRecentlyAddedLibraryMetadata withAudienceRating(Optional audienceRating) { + Utils.checkNotNull(audienceRating, "audienceRating"); + this.audienceRating = audienceRating; + return this; + } + + public GetRecentlyAddedLibraryMetadata withYear(double year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + public GetRecentlyAddedLibraryMetadata withYear(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + public GetRecentlyAddedLibraryMetadata withTagline(String tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = Optional.ofNullable(tagline); + return this; + } + + public GetRecentlyAddedLibraryMetadata withTagline(Optional tagline) { + Utils.checkNotNull(tagline, "tagline"); + this.tagline = tagline; + return this; + } + + public GetRecentlyAddedLibraryMetadata withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + public GetRecentlyAddedLibraryMetadata withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + public GetRecentlyAddedLibraryMetadata withArt(String art) { + Utils.checkNotNull(art, "art"); + this.art = Optional.ofNullable(art); + return this; + } + + public GetRecentlyAddedLibraryMetadata withArt(Optional art) { + Utils.checkNotNull(art, "art"); + this.art = art; + return this; + } + + public GetRecentlyAddedLibraryMetadata withDuration(double duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public GetRecentlyAddedLibraryMetadata withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public GetRecentlyAddedLibraryMetadata withOriginallyAvailableAt(OffsetDateTime originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + public GetRecentlyAddedLibraryMetadata withOriginallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + public GetRecentlyAddedLibraryMetadata withAddedAt(double addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public GetRecentlyAddedLibraryMetadata withAddedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public GetRecentlyAddedLibraryMetadata withUpdatedAt(double updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public GetRecentlyAddedLibraryMetadata withUpdatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public GetRecentlyAddedLibraryMetadata withAudienceRatingImage(String audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); + return this; + } + + public GetRecentlyAddedLibraryMetadata withAudienceRatingImage(Optional audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = audienceRatingImage; + return this; + } + + public GetRecentlyAddedLibraryMetadata withChapterSource(String chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = Optional.ofNullable(chapterSource); + return this; + } + + public GetRecentlyAddedLibraryMetadata withChapterSource(Optional chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = chapterSource; + return this; + } + + public GetRecentlyAddedLibraryMetadata withPrimaryExtraKey(String primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); + return this; + } + + public GetRecentlyAddedLibraryMetadata withPrimaryExtraKey(Optional primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = primaryExtraKey; + return this; + } + + public GetRecentlyAddedLibraryMetadata withRatingImage(String ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = Optional.ofNullable(ratingImage); + return this; + } + + public GetRecentlyAddedLibraryMetadata withRatingImage(Optional ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = ratingImage; + return this; + } + + public GetRecentlyAddedLibraryMetadata withMedia(List media) { + Utils.checkNotNull(media, "media"); + this.media = Optional.ofNullable(media); + return this; + } + + public GetRecentlyAddedLibraryMetadata withMedia(Optional> media) { + Utils.checkNotNull(media, "media"); + this.media = media; + return this; + } + + public GetRecentlyAddedLibraryMetadata withGenre(List genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = Optional.ofNullable(genre); + return this; + } + + public GetRecentlyAddedLibraryMetadata withGenre(Optional> genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = genre; + return this; + } + + public GetRecentlyAddedLibraryMetadata withDirector(List director) { + Utils.checkNotNull(director, "director"); + this.director = Optional.ofNullable(director); + return this; + } + + public GetRecentlyAddedLibraryMetadata withDirector(Optional> director) { + Utils.checkNotNull(director, "director"); + this.director = director; + return this; + } + + public GetRecentlyAddedLibraryMetadata withWriter(List writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = Optional.ofNullable(writer); + return this; + } + + public GetRecentlyAddedLibraryMetadata withWriter(Optional> writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = writer; + return this; + } + + public GetRecentlyAddedLibraryMetadata withCountry(List country) { + Utils.checkNotNull(country, "country"); + this.country = Optional.ofNullable(country); + return this; + } + + public GetRecentlyAddedLibraryMetadata withCountry(Optional> country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + + public GetRecentlyAddedLibraryMetadata withRole(List role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); + return this; + } + + public GetRecentlyAddedLibraryMetadata withRole(Optional> role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetRecentlyAddedLibraryMetadata other = (GetRecentlyAddedLibraryMetadata) o; + return + Objects.deepEquals(this.allowSync, other.allowSync) && + Objects.deepEquals(this.librarySectionID, other.librarySectionID) && + Objects.deepEquals(this.librarySectionTitle, other.librarySectionTitle) && + Objects.deepEquals(this.librarySectionUUID, other.librarySectionUUID) && + Objects.deepEquals(this.ratingKey, other.ratingKey) && + Objects.deepEquals(this.key, other.key) && + Objects.deepEquals(this.guid, other.guid) && + Objects.deepEquals(this.studio, other.studio) && + Objects.deepEquals(this.type, other.type) && + Objects.deepEquals(this.title, other.title) && + 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.tagline, other.tagline) && + Objects.deepEquals(this.thumb, other.thumb) && + Objects.deepEquals(this.art, other.art) && + 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.audienceRatingImage, other.audienceRatingImage) && + Objects.deepEquals(this.chapterSource, other.chapterSource) && + Objects.deepEquals(this.primaryExtraKey, other.primaryExtraKey) && + Objects.deepEquals(this.ratingImage, other.ratingImage) && + Objects.deepEquals(this.media, other.media) && + Objects.deepEquals(this.genre, other.genre) && + Objects.deepEquals(this.director, other.director) && + Objects.deepEquals(this.writer, other.writer) && + Objects.deepEquals(this.country, other.country) && + Objects.deepEquals(this.role, other.role); + } + + @Override + public int hashCode() { + return Objects.hash( + allowSync, + librarySectionID, + librarySectionTitle, + librarySectionUUID, + ratingKey, + key, + guid, + studio, + type, + title, + contentRating, + summary, + rating, + audienceRating, + year, + tagline, + thumb, + art, + duration, + originallyAvailableAt, + addedAt, + updatedAt, + audienceRatingImage, + chapterSource, + primaryExtraKey, + ratingImage, + media, + genre, + director, + writer, + country, + role); + } + + @Override + public String toString() { + return Utils.toString(GetRecentlyAddedLibraryMetadata.class, + "allowSync", allowSync, + "librarySectionID", librarySectionID, + "librarySectionTitle", librarySectionTitle, + "librarySectionUUID", librarySectionUUID, + "ratingKey", ratingKey, + "key", key, + "guid", guid, + "studio", studio, + "type", type, + "title", title, + "contentRating", contentRating, + "summary", summary, + "rating", rating, + "audienceRating", audienceRating, + "year", year, + "tagline", tagline, + "thumb", thumb, + "art", art, + "duration", duration, + "originallyAvailableAt", originallyAvailableAt, + "addedAt", addedAt, + "updatedAt", updatedAt, + "audienceRatingImage", audienceRatingImage, + "chapterSource", chapterSource, + "primaryExtraKey", primaryExtraKey, + "ratingImage", ratingImage, + "media", media, + "genre", genre, + "director", director, + "writer", writer, + "country", country, + "role", role); + } + + public final static class Builder { + + private Optional allowSync = Optional.empty(); + + private Optional librarySectionID = Optional.empty(); + + private Optional librarySectionTitle = Optional.empty(); + + private Optional librarySectionUUID = Optional.empty(); + + private Optional ratingKey = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional guid = Optional.empty(); + + private Optional studio = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional title = Optional.empty(); + + private Optional contentRating = Optional.empty(); + + private Optional summary = Optional.empty(); + + private Optional rating = Optional.empty(); + + private Optional audienceRating = Optional.empty(); + + private Optional year = Optional.empty(); + + private Optional tagline = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional art = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional originallyAvailableAt = Optional.empty(); + + private Optional addedAt = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Optional audienceRatingImage = Optional.empty(); + + private Optional chapterSource = Optional.empty(); + + private Optional primaryExtraKey = Optional.empty(); + + private Optional ratingImage = Optional.empty(); + + private Optional> media = Optional.empty(); + + private Optional> genre = Optional.empty(); + + private Optional> director = Optional.empty(); + + private Optional> writer = Optional.empty(); + + private Optional> country = Optional.empty(); + + private Optional> role = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder allowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); + return this; + } + + public Builder allowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; + return this; + } + + public Builder librarySectionID(double 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 librarySectionUUID(String librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); + return this; + } + + public Builder librarySectionUUID(Optional librarySectionUUID) { + Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + this.librarySectionUUID = librarySectionUUID; + return this; + } + + public Builder ratingKey(double ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = Optional.ofNullable(ratingKey); + return this; + } + + public Builder ratingKey(Optional ratingKey) { + Utils.checkNotNull(ratingKey, "ratingKey"); + this.ratingKey = ratingKey; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder guid(String guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = Optional.ofNullable(guid); + return this; + } + + public Builder guid(Optional guid) { + Utils.checkNotNull(guid, "guid"); + this.guid = guid; + return this; + } + + public Builder studio(String studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = Optional.ofNullable(studio); + return this; + } + + public Builder studio(Optional studio) { + Utils.checkNotNull(studio, "studio"); + this.studio = studio; + return this; + } + + public Builder type(String 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 title(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + public Builder title(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder contentRating(String contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = Optional.ofNullable(contentRating); + return this; + } + + public Builder contentRating(Optional contentRating) { + Utils.checkNotNull(contentRating, "contentRating"); + this.contentRating = contentRating; + return this; + } + + public Builder summary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = Optional.ofNullable(summary); + return this; + } + + public Builder summary(Optional 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) { + Utils.checkNotNull(rating, "rating"); + this.rating = rating; + return this; + } + + 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; + } + + public Builder year(double year) { + Utils.checkNotNull(year, "year"); + this.year = Optional.ofNullable(year); + return this; + } + + public Builder year(Optional year) { + Utils.checkNotNull(year, "year"); + this.year = year; + return this; + } + + 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; + } + + 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; + } + + 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 duration(double 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; + } + + public Builder originallyAvailableAt(OffsetDateTime originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); + return this; + } + + public Builder originallyAvailableAt(Optional originallyAvailableAt) { + Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); + this.originallyAvailableAt = originallyAvailableAt; + return this; + } + + public Builder addedAt(double addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = Optional.ofNullable(addedAt); + return this; + } + + public Builder addedAt(Optional addedAt) { + Utils.checkNotNull(addedAt, "addedAt"); + this.addedAt = addedAt; + return this; + } + + public Builder updatedAt(double updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public Builder updatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public Builder audienceRatingImage(String audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = Optional.ofNullable(audienceRatingImage); + return this; + } + + public Builder audienceRatingImage(Optional audienceRatingImage) { + Utils.checkNotNull(audienceRatingImage, "audienceRatingImage"); + this.audienceRatingImage = audienceRatingImage; + return this; + } + + public Builder chapterSource(String chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = Optional.ofNullable(chapterSource); + return this; + } + + public Builder chapterSource(Optional chapterSource) { + Utils.checkNotNull(chapterSource, "chapterSource"); + this.chapterSource = chapterSource; + return this; + } + + public Builder primaryExtraKey(String primaryExtraKey) { + Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); + this.primaryExtraKey = Optional.ofNullable(primaryExtraKey); + return this; + } + + 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); + return this; + } + + public Builder ratingImage(Optional ratingImage) { + Utils.checkNotNull(ratingImage, "ratingImage"); + this.ratingImage = ratingImage; + return this; + } + + public Builder media(List media) { + Utils.checkNotNull(media, "media"); + this.media = Optional.ofNullable(media); + return this; + } + + public Builder media(Optional> media) { + Utils.checkNotNull(media, "media"); + this.media = media; + return this; + } + + public Builder genre(List genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = Optional.ofNullable(genre); + return this; + } + + public Builder genre(Optional> genre) { + Utils.checkNotNull(genre, "genre"); + this.genre = genre; + return this; + } + + public Builder director(List director) { + Utils.checkNotNull(director, "director"); + this.director = Optional.ofNullable(director); + return this; + } + + public Builder director(Optional> director) { + Utils.checkNotNull(director, "director"); + this.director = director; + return this; + } + + public Builder writer(List writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = Optional.ofNullable(writer); + return this; + } + + public Builder writer(Optional> writer) { + Utils.checkNotNull(writer, "writer"); + this.writer = writer; + return this; + } + + public Builder country(List country) { + Utils.checkNotNull(country, "country"); + this.country = Optional.ofNullable(country); + return this; + } + + public Builder country(Optional> country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + + public Builder role(List role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); + return this; + } + + public Builder role(Optional> role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } + + public GetRecentlyAddedLibraryMetadata build() { + return new GetRecentlyAddedLibraryMetadata( + allowSync, + librarySectionID, + librarySectionTitle, + librarySectionUUID, + ratingKey, + key, + guid, + studio, + type, + title, + contentRating, + summary, + rating, + audienceRating, + year, + tagline, + thumb, + art, + duration, + originallyAvailableAt, + addedAt, + updatedAt, + audienceRatingImage, + chapterSource, + primaryExtraKey, + ratingImage, + media, + genre, + director, + writer, + country, + role); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryPart.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryPart.java new file mode 100644 index 00000000..812f853c --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryPart.java @@ -0,0 +1,489 @@ +/* + * 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.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class GetRecentlyAddedLibraryPart { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration") + private Optional duration; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("file") + private Optional file; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("container") + private Optional container; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("has64bitOffsets") + private Optional has64bitOffsets; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hasThumbnail") + private Optional hasThumbnail; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("optimizedForStreaming") + private Optional optimizedForStreaming; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("videoProfile") + private Optional videoProfile; + + @JsonCreator + public GetRecentlyAddedLibraryPart( + @JsonProperty("id") Optional id, + @JsonProperty("key") Optional key, + @JsonProperty("duration") Optional duration, + @JsonProperty("file") Optional file, + @JsonProperty("size") Optional size, + @JsonProperty("container") Optional container, + @JsonProperty("has64bitOffsets") Optional has64bitOffsets, + @JsonProperty("hasThumbnail") Optional hasThumbnail, + @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, + @JsonProperty("videoProfile") Optional videoProfile) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(file, "file"); + Utils.checkNotNull(size, "size"); + Utils.checkNotNull(container, "container"); + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + Utils.checkNotNull(hasThumbnail, "hasThumbnail"); + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + Utils.checkNotNull(videoProfile, "videoProfile"); + this.id = id; + this.key = key; + this.duration = duration; + this.file = file; + this.size = size; + this.container = container; + this.has64bitOffsets = has64bitOffsets; + this.hasThumbnail = hasThumbnail; + this.optimizedForStreaming = optimizedForStreaming; + this.videoProfile = videoProfile; + } + + public GetRecentlyAddedLibraryPart() { + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional id() { + return id; + } + + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional duration() { + return duration; + } + + @JsonIgnore + public Optional file() { + return file; + } + + @JsonIgnore + public Optional size() { + return size; + } + + @JsonIgnore + public Optional container() { + return container; + } + + @JsonIgnore + public Optional has64bitOffsets() { + return has64bitOffsets; + } + + @JsonIgnore + public Optional hasThumbnail() { + return hasThumbnail; + } + + @JsonIgnore + public Optional optimizedForStreaming() { + return optimizedForStreaming; + } + + @JsonIgnore + public Optional videoProfile() { + return videoProfile; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetRecentlyAddedLibraryPart withId(double id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public GetRecentlyAddedLibraryPart withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public GetRecentlyAddedLibraryPart withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public GetRecentlyAddedLibraryPart withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetRecentlyAddedLibraryPart withDuration(double duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + public GetRecentlyAddedLibraryPart withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + public GetRecentlyAddedLibraryPart withFile(String file) { + Utils.checkNotNull(file, "file"); + this.file = Optional.ofNullable(file); + return this; + } + + public GetRecentlyAddedLibraryPart withFile(Optional file) { + Utils.checkNotNull(file, "file"); + this.file = file; + return this; + } + + public GetRecentlyAddedLibraryPart withSize(double size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public GetRecentlyAddedLibraryPart withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public GetRecentlyAddedLibraryPart withContainer(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public GetRecentlyAddedLibraryPart withContainer(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public GetRecentlyAddedLibraryPart withHas64bitOffsets(boolean has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); + return this; + } + + public GetRecentlyAddedLibraryPart withHas64bitOffsets(Optional has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = has64bitOffsets; + return this; + } + + public GetRecentlyAddedLibraryPart withHasThumbnail(double hasThumbnail) { + Utils.checkNotNull(hasThumbnail, "hasThumbnail"); + this.hasThumbnail = Optional.ofNullable(hasThumbnail); + return this; + } + + public GetRecentlyAddedLibraryPart withHasThumbnail(Optional hasThumbnail) { + Utils.checkNotNull(hasThumbnail, "hasThumbnail"); + this.hasThumbnail = hasThumbnail; + return this; + } + + public GetRecentlyAddedLibraryPart withOptimizedForStreaming(boolean optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); + return this; + } + + public GetRecentlyAddedLibraryPart withOptimizedForStreaming(Optional optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = optimizedForStreaming; + return this; + } + + public GetRecentlyAddedLibraryPart withVideoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = Optional.ofNullable(videoProfile); + return this; + } + + public GetRecentlyAddedLibraryPart withVideoProfile(Optional videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetRecentlyAddedLibraryPart other = (GetRecentlyAddedLibraryPart) o; + return + Objects.deepEquals(this.id, other.id) && + Objects.deepEquals(this.key, other.key) && + Objects.deepEquals(this.duration, other.duration) && + Objects.deepEquals(this.file, other.file) && + Objects.deepEquals(this.size, other.size) && + Objects.deepEquals(this.container, other.container) && + Objects.deepEquals(this.has64bitOffsets, other.has64bitOffsets) && + Objects.deepEquals(this.hasThumbnail, other.hasThumbnail) && + Objects.deepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && + Objects.deepEquals(this.videoProfile, other.videoProfile); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + key, + duration, + file, + size, + container, + has64bitOffsets, + hasThumbnail, + optimizedForStreaming, + videoProfile); + } + + @Override + public String toString() { + return Utils.toString(GetRecentlyAddedLibraryPart.class, + "id", id, + "key", key, + "duration", duration, + "file", file, + "size", size, + "container", container, + "has64bitOffsets", has64bitOffsets, + "hasThumbnail", hasThumbnail, + "optimizedForStreaming", optimizedForStreaming, + "videoProfile", videoProfile); + } + + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional key = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional file = Optional.empty(); + + private Optional size = Optional.empty(); + + private Optional container = Optional.empty(); + + private Optional has64bitOffsets = Optional.empty(); + + private Optional hasThumbnail = Optional.empty(); + + private Optional optimizedForStreaming = Optional.empty(); + + private Optional videoProfile = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder id(double id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder duration(double 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; + } + + public Builder file(String file) { + Utils.checkNotNull(file, "file"); + this.file = Optional.ofNullable(file); + return this; + } + + public Builder file(Optional file) { + Utils.checkNotNull(file, "file"); + this.file = file; + return this; + } + + public Builder size(double size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public Builder container(String container) { + Utils.checkNotNull(container, "container"); + this.container = Optional.ofNullable(container); + return this; + } + + public Builder container(Optional container) { + Utils.checkNotNull(container, "container"); + this.container = container; + return this; + } + + public Builder has64bitOffsets(boolean has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); + return this; + } + + public Builder has64bitOffsets(Optional has64bitOffsets) { + Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); + this.has64bitOffsets = has64bitOffsets; + return this; + } + + public Builder hasThumbnail(double hasThumbnail) { + Utils.checkNotNull(hasThumbnail, "hasThumbnail"); + this.hasThumbnail = Optional.ofNullable(hasThumbnail); + return this; + } + + public Builder hasThumbnail(Optional hasThumbnail) { + Utils.checkNotNull(hasThumbnail, "hasThumbnail"); + this.hasThumbnail = hasThumbnail; + return this; + } + + public Builder optimizedForStreaming(boolean optimizedForStreaming) { + Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); + this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); + return this; + } + + 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 GetRecentlyAddedLibraryPart build() { + return new GetRecentlyAddedLibraryPart( + id, + key, + duration, + file, + size, + container, + has64bitOffsets, + hasThumbnail, + optimizedForStreaming, + videoProfile); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryRequest.java new file mode 100644 index 00000000..279be5aa --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryRequest.java @@ -0,0 +1,525 @@ +/* + * 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.core.type.TypeReference; +import dev.plexapi.sdk.utils.LazySingletonValue; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Integer; +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 GetRecentlyAddedLibraryRequest { + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=contentDirectoryID") + private Optional contentDirectoryID; + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=pinnedContentDirectoryID") + private Optional> pinnedContentDirectoryID; + + /** + * The library section ID for filtering content. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=sectionID") + private Optional sectionID; + + /** + * The type of media to retrieve. + * 1 = movie + * 2 = show + * 3 = season + * 4 = episode + * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + * + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") + private QueryParamType type; + + /** + * Adds the Meta object to the response + * + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeMeta") + private Optional includeMeta; + + /** + * The index of the first item to return. If not specified, the first item will be returned. + * If the number of items exceeds the limit, the response will be paginated. + * By default this is 0 + * + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Container-Start") + private Optional xPlexContainerStart; + + /** + * The number of items to return. If not specified, all items will be returned. + * If the number of items exceeds the limit, the response will be paginated. + * By default this is 50 + * + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Container-Size") + private Optional xPlexContainerSize; + + @JsonCreator + public GetRecentlyAddedLibraryRequest( + Optional contentDirectoryID, + Optional> pinnedContentDirectoryID, + Optional sectionID, + QueryParamType type, + Optional includeMeta, + Optional xPlexContainerStart, + Optional xPlexContainerSize) { + Utils.checkNotNull(contentDirectoryID, "contentDirectoryID"); + Utils.checkNotNull(pinnedContentDirectoryID, "pinnedContentDirectoryID"); + Utils.checkNotNull(sectionID, "sectionID"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(includeMeta, "includeMeta"); + Utils.checkNotNull(xPlexContainerStart, "xPlexContainerStart"); + Utils.checkNotNull(xPlexContainerSize, "xPlexContainerSize"); + this.contentDirectoryID = contentDirectoryID; + this.pinnedContentDirectoryID = pinnedContentDirectoryID; + this.sectionID = sectionID; + this.type = type; + this.includeMeta = includeMeta; + this.xPlexContainerStart = xPlexContainerStart; + this.xPlexContainerSize = xPlexContainerSize; + } + + public GetRecentlyAddedLibraryRequest( + QueryParamType type) { + this(Optional.empty(), Optional.empty(), Optional.empty(), type, Optional.empty(), Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional contentDirectoryID() { + return contentDirectoryID; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> pinnedContentDirectoryID() { + return (Optional>) pinnedContentDirectoryID; + } + + /** + * The library section ID for filtering content. + */ + @JsonIgnore + public Optional sectionID() { + return sectionID; + } + + /** + * The type of media to retrieve. + * 1 = movie + * 2 = show + * 3 = season + * 4 = episode + * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + * + */ + @JsonIgnore + public QueryParamType type() { + return type; + } + + /** + * Adds the Meta object to the response + * + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional includeMeta() { + return (Optional) includeMeta; + } + + /** + * The index of the first item to return. If not specified, the first item will be returned. + * If the number of items exceeds the limit, the response will be paginated. + * By default this is 0 + * + */ + @JsonIgnore + public Optional xPlexContainerStart() { + return xPlexContainerStart; + } + + /** + * The number of items to return. If not specified, all items will be returned. + * If the number of items exceeds the limit, the response will be paginated. + * By default this is 50 + * + */ + @JsonIgnore + public Optional xPlexContainerSize() { + return xPlexContainerSize; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetRecentlyAddedLibraryRequest withContentDirectoryID(long contentDirectoryID) { + Utils.checkNotNull(contentDirectoryID, "contentDirectoryID"); + this.contentDirectoryID = Optional.ofNullable(contentDirectoryID); + return this; + } + + public GetRecentlyAddedLibraryRequest withContentDirectoryID(Optional contentDirectoryID) { + Utils.checkNotNull(contentDirectoryID, "contentDirectoryID"); + this.contentDirectoryID = contentDirectoryID; + return this; + } + + public GetRecentlyAddedLibraryRequest withPinnedContentDirectoryID(List pinnedContentDirectoryID) { + Utils.checkNotNull(pinnedContentDirectoryID, "pinnedContentDirectoryID"); + this.pinnedContentDirectoryID = Optional.ofNullable(pinnedContentDirectoryID); + return this; + } + + public GetRecentlyAddedLibraryRequest withPinnedContentDirectoryID(Optional> pinnedContentDirectoryID) { + Utils.checkNotNull(pinnedContentDirectoryID, "pinnedContentDirectoryID"); + this.pinnedContentDirectoryID = pinnedContentDirectoryID; + return this; + } + + /** + * The library section ID for filtering content. + */ + public GetRecentlyAddedLibraryRequest withSectionID(long sectionID) { + Utils.checkNotNull(sectionID, "sectionID"); + this.sectionID = Optional.ofNullable(sectionID); + return this; + } + + /** + * The library section ID for filtering content. + */ + public GetRecentlyAddedLibraryRequest withSectionID(Optional sectionID) { + Utils.checkNotNull(sectionID, "sectionID"); + this.sectionID = sectionID; + return this; + } + + /** + * The type of media to retrieve. + * 1 = movie + * 2 = show + * 3 = season + * 4 = episode + * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + * + */ + public GetRecentlyAddedLibraryRequest withType(QueryParamType type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * Adds the Meta object to the response + * + */ + public GetRecentlyAddedLibraryRequest withIncludeMeta(QueryParamIncludeMeta includeMeta) { + Utils.checkNotNull(includeMeta, "includeMeta"); + this.includeMeta = Optional.ofNullable(includeMeta); + return this; + } + + /** + * Adds the Meta object to the response + * + */ + public GetRecentlyAddedLibraryRequest withIncludeMeta(Optional includeMeta) { + Utils.checkNotNull(includeMeta, "includeMeta"); + this.includeMeta = includeMeta; + return this; + } + + /** + * The index of the first item to return. If not specified, the first item will be returned. + * If the number of items exceeds the limit, the response will be paginated. + * By default this is 0 + * + */ + public GetRecentlyAddedLibraryRequest withXPlexContainerStart(int xPlexContainerStart) { + Utils.checkNotNull(xPlexContainerStart, "xPlexContainerStart"); + this.xPlexContainerStart = Optional.ofNullable(xPlexContainerStart); + return this; + } + + /** + * The index of the first item to return. If not specified, the first item will be returned. + * If the number of items exceeds the limit, the response will be paginated. + * By default this is 0 + * + */ + public GetRecentlyAddedLibraryRequest withXPlexContainerStart(Optional xPlexContainerStart) { + Utils.checkNotNull(xPlexContainerStart, "xPlexContainerStart"); + this.xPlexContainerStart = xPlexContainerStart; + return this; + } + + /** + * The number of items to return. If not specified, all items will be returned. + * If the number of items exceeds the limit, the response will be paginated. + * By default this is 50 + * + */ + public GetRecentlyAddedLibraryRequest withXPlexContainerSize(int xPlexContainerSize) { + Utils.checkNotNull(xPlexContainerSize, "xPlexContainerSize"); + this.xPlexContainerSize = Optional.ofNullable(xPlexContainerSize); + return this; + } + + /** + * The number of items to return. If not specified, all items will be returned. + * If the number of items exceeds the limit, the response will be paginated. + * By default this is 50 + * + */ + public GetRecentlyAddedLibraryRequest withXPlexContainerSize(Optional xPlexContainerSize) { + Utils.checkNotNull(xPlexContainerSize, "xPlexContainerSize"); + this.xPlexContainerSize = xPlexContainerSize; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetRecentlyAddedLibraryRequest other = (GetRecentlyAddedLibraryRequest) o; + return + Objects.deepEquals(this.contentDirectoryID, other.contentDirectoryID) && + Objects.deepEquals(this.pinnedContentDirectoryID, other.pinnedContentDirectoryID) && + Objects.deepEquals(this.sectionID, other.sectionID) && + Objects.deepEquals(this.type, other.type) && + Objects.deepEquals(this.includeMeta, other.includeMeta) && + Objects.deepEquals(this.xPlexContainerStart, other.xPlexContainerStart) && + Objects.deepEquals(this.xPlexContainerSize, other.xPlexContainerSize); + } + + @Override + public int hashCode() { + return Objects.hash( + contentDirectoryID, + pinnedContentDirectoryID, + sectionID, + type, + includeMeta, + xPlexContainerStart, + xPlexContainerSize); + } + + @Override + public String toString() { + return Utils.toString(GetRecentlyAddedLibraryRequest.class, + "contentDirectoryID", contentDirectoryID, + "pinnedContentDirectoryID", pinnedContentDirectoryID, + "sectionID", sectionID, + "type", type, + "includeMeta", includeMeta, + "xPlexContainerStart", xPlexContainerStart, + "xPlexContainerSize", xPlexContainerSize); + } + + public final static class Builder { + + private Optional contentDirectoryID = Optional.empty(); + + private Optional> pinnedContentDirectoryID = Optional.empty(); + + private Optional sectionID = Optional.empty(); + + private QueryParamType type; + + private Optional includeMeta; + + private Optional xPlexContainerStart; + + private Optional xPlexContainerSize; + + private Builder() { + // force use of static builder() method + } + + public Builder contentDirectoryID(long contentDirectoryID) { + Utils.checkNotNull(contentDirectoryID, "contentDirectoryID"); + this.contentDirectoryID = Optional.ofNullable(contentDirectoryID); + return this; + } + + public Builder contentDirectoryID(Optional contentDirectoryID) { + Utils.checkNotNull(contentDirectoryID, "contentDirectoryID"); + this.contentDirectoryID = contentDirectoryID; + return this; + } + + public Builder pinnedContentDirectoryID(List pinnedContentDirectoryID) { + Utils.checkNotNull(pinnedContentDirectoryID, "pinnedContentDirectoryID"); + this.pinnedContentDirectoryID = Optional.ofNullable(pinnedContentDirectoryID); + return this; + } + + public Builder pinnedContentDirectoryID(Optional> pinnedContentDirectoryID) { + Utils.checkNotNull(pinnedContentDirectoryID, "pinnedContentDirectoryID"); + this.pinnedContentDirectoryID = pinnedContentDirectoryID; + return this; + } + + /** + * The library section ID for filtering content. + */ + public Builder sectionID(long sectionID) { + Utils.checkNotNull(sectionID, "sectionID"); + this.sectionID = Optional.ofNullable(sectionID); + return this; + } + + /** + * The library section ID for filtering content. + */ + public Builder sectionID(Optional sectionID) { + Utils.checkNotNull(sectionID, "sectionID"); + this.sectionID = sectionID; + return this; + } + + /** + * The type of media to retrieve. + * 1 = movie + * 2 = show + * 3 = season + * 4 = episode + * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + * + */ + public Builder type(QueryParamType type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * Adds the Meta object to the response + * + */ + public Builder includeMeta(QueryParamIncludeMeta includeMeta) { + Utils.checkNotNull(includeMeta, "includeMeta"); + this.includeMeta = Optional.ofNullable(includeMeta); + return this; + } + + /** + * Adds the Meta object to the response + * + */ + public Builder includeMeta(Optional includeMeta) { + Utils.checkNotNull(includeMeta, "includeMeta"); + this.includeMeta = includeMeta; + return this; + } + + /** + * The index of the first item to return. If not specified, the first item will be returned. + * If the number of items exceeds the limit, the response will be paginated. + * By default this is 0 + * + */ + public Builder xPlexContainerStart(int xPlexContainerStart) { + Utils.checkNotNull(xPlexContainerStart, "xPlexContainerStart"); + this.xPlexContainerStart = Optional.ofNullable(xPlexContainerStart); + return this; + } + + /** + * The index of the first item to return. If not specified, the first item will be returned. + * If the number of items exceeds the limit, the response will be paginated. + * By default this is 0 + * + */ + public Builder xPlexContainerStart(Optional xPlexContainerStart) { + Utils.checkNotNull(xPlexContainerStart, "xPlexContainerStart"); + this.xPlexContainerStart = xPlexContainerStart; + return this; + } + + /** + * The number of items to return. If not specified, all items will be returned. + * If the number of items exceeds the limit, the response will be paginated. + * By default this is 50 + * + */ + public Builder xPlexContainerSize(int xPlexContainerSize) { + Utils.checkNotNull(xPlexContainerSize, "xPlexContainerSize"); + this.xPlexContainerSize = Optional.ofNullable(xPlexContainerSize); + return this; + } + + /** + * The number of items to return. If not specified, all items will be returned. + * If the number of items exceeds the limit, the response will be paginated. + * By default this is 50 + * + */ + public Builder xPlexContainerSize(Optional xPlexContainerSize) { + Utils.checkNotNull(xPlexContainerSize, "xPlexContainerSize"); + this.xPlexContainerSize = xPlexContainerSize; + return this; + } + + public GetRecentlyAddedLibraryRequest build() { + if (includeMeta == null) { + includeMeta = _SINGLETON_VALUE_IncludeMeta.value(); + } + if (xPlexContainerStart == null) { + xPlexContainerStart = _SINGLETON_VALUE_XPlexContainerStart.value(); + } + if (xPlexContainerSize == null) { + xPlexContainerSize = _SINGLETON_VALUE_XPlexContainerSize.value(); + } return new GetRecentlyAddedLibraryRequest( + contentDirectoryID, + pinnedContentDirectoryID, + sectionID, + type, + includeMeta, + xPlexContainerStart, + xPlexContainerSize); + } + + private static final LazySingletonValue> _SINGLETON_VALUE_IncludeMeta = + new LazySingletonValue<>( + "includeMeta", + "0", + new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_XPlexContainerStart = + new LazySingletonValue<>( + "X-Plex-Container-Start", + "0", + new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_XPlexContainerSize = + new LazySingletonValue<>( + "X-Plex-Container-Size", + "50", + new TypeReference>() {}); + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryRequestBuilder.java new file mode 100644 index 00000000..7c05a5ca --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.operations; + +import dev.plexapi.sdk.utils.Utils; + +public class GetRecentlyAddedLibraryRequestBuilder { + + private GetRecentlyAddedLibraryRequest request; + private final SDKMethodInterfaces.MethodCallGetRecentlyAddedLibrary sdk; + + public GetRecentlyAddedLibraryRequestBuilder(SDKMethodInterfaces.MethodCallGetRecentlyAddedLibrary sdk) { + this.sdk = sdk; + } + + public GetRecentlyAddedLibraryRequestBuilder request(GetRecentlyAddedLibraryRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetRecentlyAddedLibraryResponse call() throws Exception { + + return sdk.getRecentlyAddedLibrary( + request); + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryResponse.java new file mode 100644 index 00000000..94ed5292 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryResponse.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.Response; +import dev.plexapi.sdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class GetRecentlyAddedLibraryResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * The recently added content + */ + private Optional object; + + @JsonCreator + public GetRecentlyAddedLibraryResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + public GetRecentlyAddedLibraryResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * The recently added content + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetRecentlyAddedLibraryResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetRecentlyAddedLibraryResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetRecentlyAddedLibraryResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The recently added content + */ + public GetRecentlyAddedLibraryResponse withObject(GetRecentlyAddedLibraryResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * The recently added content + */ + public GetRecentlyAddedLibraryResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetRecentlyAddedLibraryResponse other = (GetRecentlyAddedLibraryResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse) && + Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(GetRecentlyAddedLibraryResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The recently added content + */ + public Builder object(GetRecentlyAddedLibraryResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * The recently added content + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public GetRecentlyAddedLibraryResponse build() { + return new GetRecentlyAddedLibraryResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryResponseBody.java new file mode 100644 index 00000000..f63e92f9 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryResponseBody.java @@ -0,0 +1,114 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Objects; +import java.util.Optional; + +/** + * GetRecentlyAddedLibraryResponseBody - The recently added content + */ + +public class GetRecentlyAddedLibraryResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("MediaContainer") + private Optional mediaContainer; + + @JsonCreator + public GetRecentlyAddedLibraryResponseBody( + @JsonProperty("MediaContainer") Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + } + + public GetRecentlyAddedLibraryResponseBody() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mediaContainer() { + return (Optional) mediaContainer; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetRecentlyAddedLibraryResponseBody withMediaContainer(GetRecentlyAddedLibraryMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public GetRecentlyAddedLibraryResponseBody withMediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetRecentlyAddedLibraryResponseBody other = (GetRecentlyAddedLibraryResponseBody) o; + return + Objects.deepEquals(this.mediaContainer, other.mediaContainer); + } + + @Override + public int hashCode() { + return Objects.hash( + mediaContainer); + } + + @Override + public String toString() { + return Utils.toString(GetRecentlyAddedLibraryResponseBody.class, + "mediaContainer", mediaContainer); + } + + public final static class Builder { + + private Optional mediaContainer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder mediaContainer(GetRecentlyAddedLibraryMediaContainer mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = Optional.ofNullable(mediaContainer); + return this; + } + + public Builder mediaContainer(Optional mediaContainer) { + Utils.checkNotNull(mediaContainer, "mediaContainer"); + this.mediaContainer = mediaContainer; + return this; + } + + public GetRecentlyAddedLibraryResponseBody build() { + return new GetRecentlyAddedLibraryResponseBody( + mediaContainer); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryRole.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryRole.java new file mode 100644 index 00000000..85b410af --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryRole.java @@ -0,0 +1,109 @@ +/* + * 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 GetRecentlyAddedLibraryRole { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + @JsonCreator + public GetRecentlyAddedLibraryRole( + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + } + + public GetRecentlyAddedLibraryRole() { + this(Optional.empty()); + } + + @JsonIgnore + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetRecentlyAddedLibraryRole withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public GetRecentlyAddedLibraryRole 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; + } + GetRecentlyAddedLibraryRole other = (GetRecentlyAddedLibraryRole) o; + return + Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return Objects.hash( + tag); + } + + @Override + public String toString() { + return Utils.toString(GetRecentlyAddedLibraryRole.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 GetRecentlyAddedLibraryRole build() { + return new GetRecentlyAddedLibraryRole( + tag); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryType.java new file mode 100644 index 00000000..1650f598 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryType.java @@ -0,0 +1,319 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + + +public class GetRecentlyAddedLibraryType { + + @JsonProperty("key") + private String key; + + @JsonProperty("type") + private String type; + + @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 GetRecentlyAddedLibraryType( + @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 GetRecentlyAddedLibraryType( + String key, + String type, + String title, + boolean active) { + this(key, type, title, active, Optional.empty(), Optional.empty(), Optional.empty()); + } + + @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 GetRecentlyAddedLibraryType withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetRecentlyAddedLibraryType withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetRecentlyAddedLibraryType withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public GetRecentlyAddedLibraryType withActive(boolean active) { + Utils.checkNotNull(active, "active"); + this.active = active; + return this; + } + + public GetRecentlyAddedLibraryType withFilter(List filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + public GetRecentlyAddedLibraryType withFilter(Optional> filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public GetRecentlyAddedLibraryType withSort(List sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = Optional.ofNullable(sort); + return this; + } + + public GetRecentlyAddedLibraryType withSort(Optional> sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = sort; + return this; + } + + public GetRecentlyAddedLibraryType withField(List field) { + Utils.checkNotNull(field, "field"); + this.field = Optional.ofNullable(field); + return this; + } + + public GetRecentlyAddedLibraryType 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; + } + GetRecentlyAddedLibraryType other = (GetRecentlyAddedLibraryType) 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); + } + + @Override + public int hashCode() { + return Objects.hash( + key, + type, + title, + active, + filter, + sort, + field); + } + + @Override + public String toString() { + return Utils.toString(GetRecentlyAddedLibraryType.class, + "key", key, + "type", type, + "title", title, + "active", active, + "filter", filter, + "sort", sort, + "field", field); + } + + 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 + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = type; + 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 GetRecentlyAddedLibraryType build() { + return new GetRecentlyAddedLibraryType( + key, + type, + title, + active, + filter, + sort, + field); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryWriter.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryWriter.java new file mode 100644 index 00000000..e41c5827 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedLibraryWriter.java @@ -0,0 +1,109 @@ +/* + * 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 GetRecentlyAddedLibraryWriter { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tag") + private Optional tag; + + @JsonCreator + public GetRecentlyAddedLibraryWriter( + @JsonProperty("tag") Optional tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = tag; + } + + public GetRecentlyAddedLibraryWriter() { + this(Optional.empty()); + } + + @JsonIgnore + public Optional tag() { + return tag; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetRecentlyAddedLibraryWriter withTag(String tag) { + Utils.checkNotNull(tag, "tag"); + this.tag = Optional.ofNullable(tag); + return this; + } + + public GetRecentlyAddedLibraryWriter 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; + } + GetRecentlyAddedLibraryWriter other = (GetRecentlyAddedLibraryWriter) o; + return + Objects.deepEquals(this.tag, other.tag); + } + + @Override + public int hashCode() { + return Objects.hash( + tag); + } + + @Override + public String toString() { + return Utils.toString(GetRecentlyAddedLibraryWriter.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 GetRecentlyAddedLibraryWriter build() { + return new GetRecentlyAddedLibraryWriter( + tag); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedMediaContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedMediaContainer.java index 23d0d824..c1dd23eb 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedMediaContainer.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedMediaContainer.java @@ -13,6 +13,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; import java.lang.Boolean; import java.lang.Double; +import java.lang.Integer; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; @@ -23,29 +24,32 @@ import java.util.Optional; public class GetRecentlyAddedMediaContainer { - @JsonInclude(Include.NON_ABSENT) @JsonProperty("size") - private Optional size; + private double size; @JsonInclude(Include.NON_ABSENT) - @JsonProperty("allowSync") - private Optional allowSync; + @JsonProperty("offset") + private Optional offset; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totalSize") + private Optional totalSize; @JsonInclude(Include.NON_ABSENT) @JsonProperty("identifier") private Optional identifier; @JsonInclude(Include.NON_ABSENT) - @JsonProperty("mediaTagPrefix") - private Optional mediaTagPrefix; + @JsonProperty("allowSync") + private Optional allowSync; + /** + * The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. + * + */ @JsonInclude(Include.NON_ABSENT) - @JsonProperty("mediaTagVersion") - private Optional mediaTagVersion; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("mixedParents") - private Optional mixedParents; + @JsonProperty("Meta") + private Optional meta; @JsonInclude(Include.NON_ABSENT) @JsonProperty("Metadata") @@ -53,41 +57,47 @@ public class GetRecentlyAddedMediaContainer { @JsonCreator public GetRecentlyAddedMediaContainer( - @JsonProperty("size") Optional size, - @JsonProperty("allowSync") Optional allowSync, + @JsonProperty("size") double size, + @JsonProperty("offset") Optional offset, + @JsonProperty("totalSize") Optional totalSize, @JsonProperty("identifier") Optional identifier, - @JsonProperty("mediaTagPrefix") Optional mediaTagPrefix, - @JsonProperty("mediaTagVersion") Optional mediaTagVersion, - @JsonProperty("mixedParents") Optional mixedParents, + @JsonProperty("allowSync") Optional allowSync, + @JsonProperty("Meta") Optional meta, @JsonProperty("Metadata") Optional> metadata) { Utils.checkNotNull(size, "size"); - Utils.checkNotNull(allowSync, "allowSync"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(totalSize, "totalSize"); Utils.checkNotNull(identifier, "identifier"); - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - Utils.checkNotNull(mixedParents, "mixedParents"); + Utils.checkNotNull(allowSync, "allowSync"); + Utils.checkNotNull(meta, "meta"); Utils.checkNotNull(metadata, "metadata"); this.size = size; - this.allowSync = allowSync; + this.offset = offset; + this.totalSize = totalSize; this.identifier = identifier; - this.mediaTagPrefix = mediaTagPrefix; - this.mediaTagVersion = mediaTagVersion; - this.mixedParents = mixedParents; + this.allowSync = allowSync; + this.meta = meta; this.metadata = metadata; } - public GetRecentlyAddedMediaContainer() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + public GetRecentlyAddedMediaContainer( + double size) { + this(size, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); } @JsonIgnore - public Optional size() { + public double size() { return size; } @JsonIgnore - public Optional allowSync() { - return allowSync; + public Optional offset() { + return offset; + } + + @JsonIgnore + public Optional totalSize() { + return totalSize; } @JsonIgnore @@ -96,18 +106,18 @@ public class GetRecentlyAddedMediaContainer { } @JsonIgnore - public Optional mediaTagPrefix() { - return mediaTagPrefix; + public Optional allowSync() { + return allowSync; } + /** + * The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. + * + */ + @SuppressWarnings("unchecked") @JsonIgnore - public Optional mediaTagVersion() { - return mediaTagVersion; - } - - @JsonIgnore - public Optional mixedParents() { - return mixedParents; + public Optional meta() { + return (Optional) meta; } @SuppressWarnings("unchecked") @@ -121,26 +131,32 @@ public class GetRecentlyAddedMediaContainer { } public GetRecentlyAddedMediaContainer withSize(double size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - public GetRecentlyAddedMediaContainer withSize(Optional size) { Utils.checkNotNull(size, "size"); this.size = size; return this; } - public GetRecentlyAddedMediaContainer withAllowSync(boolean allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = Optional.ofNullable(allowSync); + public GetRecentlyAddedMediaContainer withOffset(int offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); return this; } - public GetRecentlyAddedMediaContainer withAllowSync(Optional allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = allowSync; + public GetRecentlyAddedMediaContainer withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public GetRecentlyAddedMediaContainer withTotalSize(int totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + public GetRecentlyAddedMediaContainer withTotalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; return this; } @@ -156,39 +172,35 @@ public class GetRecentlyAddedMediaContainer { return this; } - public GetRecentlyAddedMediaContainer withMediaTagPrefix(String mediaTagPrefix) { - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - this.mediaTagPrefix = Optional.ofNullable(mediaTagPrefix); + public GetRecentlyAddedMediaContainer withAllowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); return this; } - public GetRecentlyAddedMediaContainer withMediaTagPrefix(Optional mediaTagPrefix) { - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - this.mediaTagPrefix = mediaTagPrefix; + public GetRecentlyAddedMediaContainer withAllowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; return this; } - public GetRecentlyAddedMediaContainer withMediaTagVersion(double mediaTagVersion) { - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - this.mediaTagVersion = Optional.ofNullable(mediaTagVersion); + /** + * The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. + * + */ + public GetRecentlyAddedMediaContainer withMeta(Meta meta) { + Utils.checkNotNull(meta, "meta"); + this.meta = Optional.ofNullable(meta); return this; } - public GetRecentlyAddedMediaContainer withMediaTagVersion(Optional mediaTagVersion) { - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - this.mediaTagVersion = mediaTagVersion; - return this; - } - - public GetRecentlyAddedMediaContainer withMixedParents(boolean mixedParents) { - Utils.checkNotNull(mixedParents, "mixedParents"); - this.mixedParents = Optional.ofNullable(mixedParents); - return this; - } - - public GetRecentlyAddedMediaContainer withMixedParents(Optional mixedParents) { - Utils.checkNotNull(mixedParents, "mixedParents"); - this.mixedParents = mixedParents; + /** + * The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. + * + */ + public GetRecentlyAddedMediaContainer withMeta(Optional meta) { + Utils.checkNotNull(meta, "meta"); + this.meta = meta; return this; } @@ -215,11 +227,11 @@ public class GetRecentlyAddedMediaContainer { GetRecentlyAddedMediaContainer other = (GetRecentlyAddedMediaContainer) o; return Objects.deepEquals(this.size, other.size) && - Objects.deepEquals(this.allowSync, other.allowSync) && + Objects.deepEquals(this.offset, other.offset) && + Objects.deepEquals(this.totalSize, other.totalSize) && Objects.deepEquals(this.identifier, other.identifier) && - Objects.deepEquals(this.mediaTagPrefix, other.mediaTagPrefix) && - Objects.deepEquals(this.mediaTagVersion, other.mediaTagVersion) && - Objects.deepEquals(this.mixedParents, other.mixedParents) && + Objects.deepEquals(this.allowSync, other.allowSync) && + Objects.deepEquals(this.meta, other.meta) && Objects.deepEquals(this.metadata, other.metadata); } @@ -227,11 +239,11 @@ public class GetRecentlyAddedMediaContainer { public int hashCode() { return Objects.hash( size, - allowSync, + offset, + totalSize, identifier, - mediaTagPrefix, - mediaTagVersion, - mixedParents, + allowSync, + meta, metadata); } @@ -239,27 +251,27 @@ public class GetRecentlyAddedMediaContainer { public String toString() { return Utils.toString(GetRecentlyAddedMediaContainer.class, "size", size, - "allowSync", allowSync, + "offset", offset, + "totalSize", totalSize, "identifier", identifier, - "mediaTagPrefix", mediaTagPrefix, - "mediaTagVersion", mediaTagVersion, - "mixedParents", mixedParents, + "allowSync", allowSync, + "meta", meta, "metadata", metadata); } public final static class Builder { - private Optional size = Optional.empty(); + private Double size; - private Optional allowSync = Optional.empty(); + private Optional offset = Optional.empty(); + + private Optional totalSize = Optional.empty(); private Optional identifier = Optional.empty(); - private Optional mediaTagPrefix = Optional.empty(); + private Optional allowSync = Optional.empty(); - private Optional mediaTagVersion = Optional.empty(); - - private Optional mixedParents = Optional.empty(); + private Optional meta = Optional.empty(); private Optional> metadata = Optional.empty(); @@ -268,26 +280,32 @@ public class GetRecentlyAddedMediaContainer { } public Builder size(double size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - public Builder size(Optional size) { Utils.checkNotNull(size, "size"); this.size = size; return this; } - public Builder allowSync(boolean allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = Optional.ofNullable(allowSync); + public Builder offset(int offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); return this; } - public Builder allowSync(Optional allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = allowSync; + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public Builder totalSize(int totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = Optional.ofNullable(totalSize); + return this; + } + + public Builder totalSize(Optional totalSize) { + Utils.checkNotNull(totalSize, "totalSize"); + this.totalSize = totalSize; return this; } @@ -303,39 +321,35 @@ public class GetRecentlyAddedMediaContainer { return this; } - public Builder mediaTagPrefix(String mediaTagPrefix) { - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - this.mediaTagPrefix = Optional.ofNullable(mediaTagPrefix); + public Builder allowSync(boolean allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = Optional.ofNullable(allowSync); return this; } - public Builder mediaTagPrefix(Optional mediaTagPrefix) { - Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix"); - this.mediaTagPrefix = mediaTagPrefix; + public Builder allowSync(Optional allowSync) { + Utils.checkNotNull(allowSync, "allowSync"); + this.allowSync = allowSync; return this; } - public Builder mediaTagVersion(double mediaTagVersion) { - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - this.mediaTagVersion = Optional.ofNullable(mediaTagVersion); + /** + * The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. + * + */ + public Builder meta(Meta meta) { + Utils.checkNotNull(meta, "meta"); + this.meta = Optional.ofNullable(meta); return this; } - public Builder mediaTagVersion(Optional mediaTagVersion) { - Utils.checkNotNull(mediaTagVersion, "mediaTagVersion"); - this.mediaTagVersion = mediaTagVersion; - return this; - } - - public Builder mixedParents(boolean mixedParents) { - Utils.checkNotNull(mixedParents, "mixedParents"); - this.mixedParents = Optional.ofNullable(mixedParents); - return this; - } - - public Builder mixedParents(Optional mixedParents) { - Utils.checkNotNull(mixedParents, "mixedParents"); - this.mixedParents = mixedParents; + /** + * The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. + * + */ + public Builder meta(Optional meta) { + Utils.checkNotNull(meta, "meta"); + this.meta = meta; return this; } @@ -354,11 +368,11 @@ public class GetRecentlyAddedMediaContainer { public GetRecentlyAddedMediaContainer build() { return new GetRecentlyAddedMediaContainer( size, - allowSync, + offset, + totalSize, identifier, - mediaTagPrefix, - mediaTagVersion, - mixedParents, + allowSync, + meta, metadata); } } 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 4b088f3a..af0bcece 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedMetadata.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedMetadata.java @@ -10,13 +10,17 @@ 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.Integer; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; -import java.time.OffsetDateTime; +import java.time.LocalDate; import java.util.List; import java.util.Objects; import java.util.Optional; @@ -24,53 +28,60 @@ import java.util.Optional; public class GetRecentlyAddedMetadata { - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("allowSync") - private Optional allowSync; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionID") - private Optional librarySectionID; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionTitle") - private Optional librarySectionTitle; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("librarySectionUUID") - private Optional librarySectionUUID; - - @JsonInclude(Include.NON_ABSENT) + /** + * The rating key (Media ID) of this media item. + * Note: This is always an integer, but is represented as a string in the API. + * + */ @JsonProperty("ratingKey") - private Optional ratingKey; + private String ratingKey; - @JsonInclude(Include.NON_ABSENT) @JsonProperty("key") - private Optional key; + private String key; - @JsonInclude(Include.NON_ABSENT) @JsonProperty("guid") - private Optional guid; + private String guid; @JsonInclude(Include.NON_ABSENT) @JsonProperty("studio") private Optional studio; @JsonInclude(Include.NON_ABSENT) - @JsonProperty("type") - private Optional type; + @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 + * + */ + @JsonProperty("type") + private GetRecentlyAddedHubsType type; + @JsonProperty("title") - private Optional title; + private String title; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("slug") + private Optional slug; @JsonInclude(Include.NON_ABSENT) @JsonProperty("contentRating") private Optional contentRating; - @JsonInclude(Include.NON_ABSENT) @JsonProperty("summary") - private Optional summary; + private String summary; @JsonInclude(Include.NON_ABSENT) @JsonProperty("rating") @@ -82,12 +93,33 @@ public class GetRecentlyAddedMetadata { @JsonInclude(Include.NON_ABSENT) @JsonProperty("year") - private Optional year; + private Optional year; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("seasonCount") + private Optional seasonCount; @JsonInclude(Include.NON_ABSENT) @JsonProperty("tagline") private Optional tagline; + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("flattenSeasons") + private Optional flattenSeasons; + + /** + * 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; @@ -96,21 +128,30 @@ public class GetRecentlyAddedMetadata { @JsonProperty("art") private Optional art; + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("banner") + private Optional banner; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("duration") - private Optional duration; + private Optional duration; @JsonInclude(Include.NON_ABSENT) @JsonProperty("originallyAvailableAt") - private Optional originallyAvailableAt; + private Optional originallyAvailableAt; - @JsonInclude(Include.NON_ABSENT) + /** + * Unix epoch datetime in seconds + */ @JsonProperty("addedAt") - private Optional addedAt; + private long addedAt; + /** + * Unix epoch datetime in seconds + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("updatedAt") - private Optional updatedAt; + private Optional updatedAt; @JsonInclude(Include.NON_ABSENT) @JsonProperty("audienceRatingImage") @@ -128,6 +169,46 @@ public class GetRecentlyAddedMetadata { @JsonProperty("ratingImage") private Optional ratingImage; + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentRatingKey") + private Optional grandparentRatingKey; + + @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; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentSlug") + private Optional grandparentSlug; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentArt") + private Optional grandparentArt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("grandparentTheme") + private Optional grandparentTheme; + + /** + * The Media object is only included when type query is `4` or higher. + * + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("Media") private Optional> media; @@ -136,6 +217,10 @@ public class GetRecentlyAddedMetadata { @JsonProperty("Genre") private Optional> genre; + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Country") + private Optional> country; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("Director") private Optional> director; @@ -145,65 +230,223 @@ public class GetRecentlyAddedMetadata { private Optional> writer; @JsonInclude(Include.NON_ABSENT) - @JsonProperty("Country") - private Optional> country; + @JsonProperty("Collection") + private Optional> collection; @JsonInclude(Include.NON_ABSENT) @JsonProperty("Role") private Optional> role; + /** + * 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 GetRecentlyAddedMetadata( - @JsonProperty("allowSync") Optional allowSync, - @JsonProperty("librarySectionID") Optional librarySectionID, - @JsonProperty("librarySectionTitle") Optional librarySectionTitle, - @JsonProperty("librarySectionUUID") Optional librarySectionUUID, - @JsonProperty("ratingKey") Optional ratingKey, - @JsonProperty("key") Optional key, - @JsonProperty("guid") Optional guid, + @JsonProperty("ratingKey") String ratingKey, + @JsonProperty("key") String key, + @JsonProperty("guid") String guid, @JsonProperty("studio") Optional studio, - @JsonProperty("type") Optional type, - @JsonProperty("title") Optional title, + @JsonProperty("skipChildren") Optional skipChildren, + @JsonProperty("librarySectionID") Optional librarySectionID, + @JsonProperty("librarySectionTitle") Optional librarySectionTitle, + @JsonProperty("librarySectionKey") Optional librarySectionKey, + @JsonProperty("type") GetRecentlyAddedHubsType type, + @JsonProperty("title") String title, + @JsonProperty("slug") Optional slug, @JsonProperty("contentRating") Optional contentRating, - @JsonProperty("summary") Optional summary, + @JsonProperty("summary") String summary, @JsonProperty("rating") Optional rating, @JsonProperty("audienceRating") Optional audienceRating, - @JsonProperty("year") Optional year, + @JsonProperty("year") Optional year, + @JsonProperty("seasonCount") Optional seasonCount, @JsonProperty("tagline") Optional tagline, + @JsonProperty("flattenSeasons") Optional flattenSeasons, + @JsonProperty("showOrdering") Optional showOrdering, @JsonProperty("thumb") Optional thumb, @JsonProperty("art") Optional art, - @JsonProperty("duration") Optional duration, - @JsonProperty("originallyAvailableAt") Optional originallyAvailableAt, - @JsonProperty("addedAt") Optional addedAt, - @JsonProperty("updatedAt") Optional updatedAt, + @JsonProperty("banner") Optional banner, + @JsonProperty("duration") Optional 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("grandparentRatingKey") Optional grandparentRatingKey, + @JsonProperty("grandparentGuid") Optional grandparentGuid, + @JsonProperty("grandparentKey") Optional grandparentKey, + @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("Media") Optional> media, @JsonProperty("Genre") Optional> genre, + @JsonProperty("Country") Optional> country, @JsonProperty("Director") Optional> director, @JsonProperty("Writer") Optional> writer, - @JsonProperty("Country") Optional> country, - @JsonProperty("Role") Optional> role) { - Utils.checkNotNull(allowSync, "allowSync"); - Utils.checkNotNull(librarySectionID, "librarySectionID"); - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); + @JsonProperty("Collection") Optional> collection, + @JsonProperty("Role") Optional> role, + @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) { Utils.checkNotNull(ratingKey, "ratingKey"); Utils.checkNotNull(key, "key"); Utils.checkNotNull(guid, "guid"); 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(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(showOrdering, "showOrdering"); Utils.checkNotNull(thumb, "thumb"); Utils.checkNotNull(art, "art"); + Utils.checkNotNull(banner, "banner"); Utils.checkNotNull(duration, "duration"); Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); Utils.checkNotNull(addedAt, "addedAt"); @@ -212,30 +455,71 @@ public class GetRecentlyAddedMetadata { Utils.checkNotNull(chapterSource, "chapterSource"); Utils.checkNotNull(primaryExtraKey, "primaryExtraKey"); Utils.checkNotNull(ratingImage, "ratingImage"); + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + Utils.checkNotNull(grandparentGuid, "grandparentGuid"); + Utils.checkNotNull(grandparentKey, "grandparentKey"); + 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(media, "media"); Utils.checkNotNull(genre, "genre"); + Utils.checkNotNull(country, "country"); Utils.checkNotNull(director, "director"); Utils.checkNotNull(writer, "writer"); - Utils.checkNotNull(country, "country"); + Utils.checkNotNull(collection, "collection"); Utils.checkNotNull(role, "role"); - this.allowSync = allowSync; - this.librarySectionID = librarySectionID; - this.librarySectionTitle = librarySectionTitle; - this.librarySectionUUID = librarySectionUUID; + 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.studio = studio; + this.skipChildren = skipChildren; + this.librarySectionID = librarySectionID; + this.librarySectionTitle = librarySectionTitle; + this.librarySectionKey = librarySectionKey; this.type = type; this.title = title; + this.slug = slug; 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.showOrdering = showOrdering; this.thumb = thumb; this.art = art; + this.banner = banner; this.duration = duration; this.originallyAvailableAt = originallyAvailableAt; this.addedAt = addedAt; @@ -244,50 +528,78 @@ public class GetRecentlyAddedMetadata { this.chapterSource = chapterSource; this.primaryExtraKey = primaryExtraKey; this.ratingImage = ratingImage; + this.grandparentRatingKey = grandparentRatingKey; + this.grandparentGuid = grandparentGuid; + this.grandparentKey = grandparentKey; + this.grandparentTitle = grandparentTitle; + this.grandparentThumb = grandparentThumb; + this.parentSlug = parentSlug; + this.grandparentSlug = grandparentSlug; + this.grandparentArt = grandparentArt; + this.grandparentTheme = grandparentTheme; this.media = media; this.genre = genre; + this.country = country; this.director = director; this.writer = writer; - this.country = country; + this.collection = collection; this.role = role; + 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 GetRecentlyAddedMetadata() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + public GetRecentlyAddedMetadata( + String ratingKey, + String key, + String guid, + GetRecentlyAddedHubsType type, + String title, + String summary, + 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(), 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()); } + /** + * The rating key (Media ID) of this media item. + * Note: This is always an integer, but is represented as a string in the API. + * + */ @JsonIgnore - public Optional allowSync() { - return allowSync; - } - - @JsonIgnore - public Optional librarySectionID() { - return librarySectionID; - } - - @JsonIgnore - public Optional librarySectionTitle() { - return librarySectionTitle; - } - - @JsonIgnore - public Optional librarySectionUUID() { - return librarySectionUUID; - } - - @JsonIgnore - public Optional ratingKey() { + public String ratingKey() { return ratingKey; } @JsonIgnore - public Optional key() { + public String key() { return key; } @JsonIgnore - public Optional guid() { + public String guid() { return guid; } @@ -297,22 +609,51 @@ public class GetRecentlyAddedMetadata { } @JsonIgnore - public Optional type() { + 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 + * + */ + @JsonIgnore + public GetRecentlyAddedHubsType type() { return type; } @JsonIgnore - public Optional title() { + public String title() { return title; } + @JsonIgnore + public Optional slug() { + return slug; + } + @JsonIgnore public Optional contentRating() { return contentRating; } @JsonIgnore - public Optional summary() { + public String summary() { return summary; } @@ -327,15 +668,41 @@ public class GetRecentlyAddedMetadata { } @JsonIgnore - public Optional year() { + public Optional year() { return year; } + @JsonIgnore + public Optional seasonCount() { + return seasonCount; + } + @JsonIgnore public Optional tagline() { return tagline; } + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional flattenSeasons() { + return (Optional) flattenSeasons; + } + + /** + * 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() { return thumb; @@ -347,22 +714,33 @@ public class GetRecentlyAddedMetadata { } @JsonIgnore - public Optional duration() { + public Optional banner() { + return banner; + } + + @JsonIgnore + public Optional duration() { return duration; } @JsonIgnore - public Optional originallyAvailableAt() { + public Optional originallyAvailableAt() { return originallyAvailableAt; } + /** + * Unix epoch datetime in seconds + */ @JsonIgnore - public Optional addedAt() { + public long addedAt() { return addedAt; } + /** + * Unix epoch datetime in seconds + */ @JsonIgnore - public Optional updatedAt() { + public Optional updatedAt() { return updatedAt; } @@ -386,6 +764,55 @@ public class GetRecentlyAddedMetadata { return ratingImage; } + @JsonIgnore + public Optional grandparentRatingKey() { + return grandparentRatingKey; + } + + @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; + } + + @JsonIgnore + public Optional grandparentSlug() { + return grandparentSlug; + } + + @JsonIgnore + public Optional grandparentArt() { + return grandparentArt; + } + + @JsonIgnore + public Optional grandparentTheme() { + return grandparentTheme; + } + + /** + * The Media object is only included when type query is `4` or higher. + * + */ @SuppressWarnings("unchecked") @JsonIgnore public Optional> media() { @@ -398,6 +825,12 @@ public class GetRecentlyAddedMetadata { return (Optional>) genre; } + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> country() { + return (Optional>) country; + } + @SuppressWarnings("unchecked") @JsonIgnore public Optional> director() { @@ -412,8 +845,8 @@ public class GetRecentlyAddedMetadata { @SuppressWarnings("unchecked") @JsonIgnore - public Optional> country() { - return (Optional>) country; + public Optional> collection() { + return (Optional>) collection; } @SuppressWarnings("unchecked") @@ -422,89 +855,170 @@ public class GetRecentlyAddedMetadata { return (Optional>) role; } + /** + * 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(); } - public GetRecentlyAddedMetadata withAllowSync(boolean allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = Optional.ofNullable(allowSync); - return this; - } - - public GetRecentlyAddedMetadata withAllowSync(Optional allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = allowSync; - return this; - } - - public GetRecentlyAddedMetadata withLibrarySectionID(double librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = Optional.ofNullable(librarySectionID); - return this; - } - - public GetRecentlyAddedMetadata withLibrarySectionID(Optional librarySectionID) { - Utils.checkNotNull(librarySectionID, "librarySectionID"); - this.librarySectionID = librarySectionID; - return this; - } - - public GetRecentlyAddedMetadata withLibrarySectionTitle(String librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); - return this; - } - - public GetRecentlyAddedMetadata withLibrarySectionTitle(Optional librarySectionTitle) { - Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); - this.librarySectionTitle = librarySectionTitle; - return this; - } - - public GetRecentlyAddedMetadata withLibrarySectionUUID(String librarySectionUUID) { - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); - return this; - } - - public GetRecentlyAddedMetadata withLibrarySectionUUID(Optional librarySectionUUID) { - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - this.librarySectionUUID = librarySectionUUID; - return this; - } - - public GetRecentlyAddedMetadata withRatingKey(double ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = Optional.ofNullable(ratingKey); - return this; - } - - public GetRecentlyAddedMetadata withRatingKey(Optional ratingKey) { + /** + * The rating key (Media ID) of this media item. + * Note: This is always an integer, but is represented as a string in the API. + * + */ + public GetRecentlyAddedMetadata withRatingKey(String ratingKey) { Utils.checkNotNull(ratingKey, "ratingKey"); this.ratingKey = ratingKey; return this; } public GetRecentlyAddedMetadata withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - public GetRecentlyAddedMetadata withKey(Optional key) { Utils.checkNotNull(key, "key"); this.key = key; return this; } public GetRecentlyAddedMetadata withGuid(String guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = Optional.ofNullable(guid); - return this; - } - - public GetRecentlyAddedMetadata withGuid(Optional guid) { Utils.checkNotNull(guid, "guid"); this.guid = guid; return this; @@ -522,13 +1036,59 @@ public class GetRecentlyAddedMetadata { return this; } - public GetRecentlyAddedMetadata withType(String type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); + public GetRecentlyAddedMetadata withSkipChildren(boolean skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = Optional.ofNullable(skipChildren); return this; } - public GetRecentlyAddedMetadata withType(Optional type) { + public GetRecentlyAddedMetadata withSkipChildren(Optional skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = skipChildren; + return this; + } + + public GetRecentlyAddedMetadata withLibrarySectionID(long librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = Optional.ofNullable(librarySectionID); + return this; + } + + public GetRecentlyAddedMetadata withLibrarySectionID(Optional librarySectionID) { + Utils.checkNotNull(librarySectionID, "librarySectionID"); + this.librarySectionID = librarySectionID; + return this; + } + + public GetRecentlyAddedMetadata withLibrarySectionTitle(String librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = Optional.ofNullable(librarySectionTitle); + return this; + } + + public GetRecentlyAddedMetadata withLibrarySectionTitle(Optional librarySectionTitle) { + Utils.checkNotNull(librarySectionTitle, "librarySectionTitle"); + this.librarySectionTitle = librarySectionTitle; + return this; + } + + public GetRecentlyAddedMetadata withLibrarySectionKey(String librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = Optional.ofNullable(librarySectionKey); + return this; + } + + public GetRecentlyAddedMetadata withLibrarySectionKey(Optional librarySectionKey) { + Utils.checkNotNull(librarySectionKey, "librarySectionKey"); + this.librarySectionKey = librarySectionKey; + return this; + } + + /** + * The type of media content + * + */ + public GetRecentlyAddedMetadata withType(GetRecentlyAddedHubsType type) { Utils.checkNotNull(type, "type"); this.type = type; return this; @@ -536,13 +1096,19 @@ public class GetRecentlyAddedMetadata { public GetRecentlyAddedMetadata withTitle(String title) { Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); + this.title = title; return this; } - public GetRecentlyAddedMetadata withTitle(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; + public GetRecentlyAddedMetadata withSlug(String slug) { + Utils.checkNotNull(slug, "slug"); + this.slug = Optional.ofNullable(slug); + return this; + } + + public GetRecentlyAddedMetadata withSlug(Optional slug) { + Utils.checkNotNull(slug, "slug"); + this.slug = slug; return this; } @@ -559,12 +1125,6 @@ public class GetRecentlyAddedMetadata { } public GetRecentlyAddedMetadata withSummary(String summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = Optional.ofNullable(summary); - return this; - } - - public GetRecentlyAddedMetadata withSummary(Optional summary) { Utils.checkNotNull(summary, "summary"); this.summary = summary; return this; @@ -594,18 +1154,30 @@ public class GetRecentlyAddedMetadata { return this; } - public GetRecentlyAddedMetadata withYear(double year) { + public GetRecentlyAddedMetadata withYear(int year) { Utils.checkNotNull(year, "year"); this.year = Optional.ofNullable(year); return this; } - public GetRecentlyAddedMetadata withYear(Optional year) { + public GetRecentlyAddedMetadata withYear(Optional year) { Utils.checkNotNull(year, "year"); this.year = year; return this; } + public GetRecentlyAddedMetadata withSeasonCount(int seasonCount) { + Utils.checkNotNull(seasonCount, "seasonCount"); + this.seasonCount = Optional.ofNullable(seasonCount); + return this; + } + + public GetRecentlyAddedMetadata withSeasonCount(Optional seasonCount) { + Utils.checkNotNull(seasonCount, "seasonCount"); + this.seasonCount = seasonCount; + return this; + } + public GetRecentlyAddedMetadata withTagline(String tagline) { Utils.checkNotNull(tagline, "tagline"); this.tagline = Optional.ofNullable(tagline); @@ -618,6 +1190,48 @@ public class GetRecentlyAddedMetadata { return this; } + public GetRecentlyAddedMetadata withFlattenSeasons(FlattenSeasons flattenSeasons) { + Utils.checkNotNull(flattenSeasons, "flattenSeasons"); + this.flattenSeasons = Optional.ofNullable(flattenSeasons); + return this; + } + + public GetRecentlyAddedMetadata withFlattenSeasons(Optional flattenSeasons) { + Utils.checkNotNull(flattenSeasons, "flattenSeasons"); + this.flattenSeasons = flattenSeasons; + 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 GetRecentlyAddedMetadata 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 GetRecentlyAddedMetadata withShowOrdering(Optional showOrdering) { + Utils.checkNotNull(showOrdering, "showOrdering"); + this.showOrdering = showOrdering; + return this; + } + public GetRecentlyAddedMetadata withThumb(String thumb) { Utils.checkNotNull(thumb, "thumb"); this.thumb = Optional.ofNullable(thumb); @@ -642,49 +1256,64 @@ public class GetRecentlyAddedMetadata { return this; } - public GetRecentlyAddedMetadata withDuration(double duration) { + public GetRecentlyAddedMetadata withBanner(String banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = Optional.ofNullable(banner); + return this; + } + + public GetRecentlyAddedMetadata withBanner(Optional banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = banner; + return this; + } + + public GetRecentlyAddedMetadata withDuration(int duration) { Utils.checkNotNull(duration, "duration"); this.duration = Optional.ofNullable(duration); return this; } - public GetRecentlyAddedMetadata withDuration(Optional duration) { + public GetRecentlyAddedMetadata withDuration(Optional duration) { Utils.checkNotNull(duration, "duration"); this.duration = duration; return this; } - public GetRecentlyAddedMetadata withOriginallyAvailableAt(OffsetDateTime originallyAvailableAt) { + public GetRecentlyAddedMetadata withOriginallyAvailableAt(LocalDate originallyAvailableAt) { Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); return this; } - public GetRecentlyAddedMetadata withOriginallyAvailableAt(Optional originallyAvailableAt) { + public GetRecentlyAddedMetadata withOriginallyAvailableAt(Optional originallyAvailableAt) { Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); this.originallyAvailableAt = originallyAvailableAt; return this; } - public GetRecentlyAddedMetadata withAddedAt(double addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = Optional.ofNullable(addedAt); - return this; - } - - public GetRecentlyAddedMetadata withAddedAt(Optional addedAt) { + /** + * Unix epoch datetime in seconds + */ + public GetRecentlyAddedMetadata withAddedAt(long addedAt) { Utils.checkNotNull(addedAt, "addedAt"); this.addedAt = addedAt; return this; } - public GetRecentlyAddedMetadata withUpdatedAt(double updatedAt) { + /** + * Unix epoch datetime in seconds + */ + public GetRecentlyAddedMetadata withUpdatedAt(long updatedAt) { Utils.checkNotNull(updatedAt, "updatedAt"); this.updatedAt = Optional.ofNullable(updatedAt); return this; } - public GetRecentlyAddedMetadata withUpdatedAt(Optional updatedAt) { + /** + * Unix epoch datetime in seconds + */ + public GetRecentlyAddedMetadata withUpdatedAt(Optional updatedAt) { Utils.checkNotNull(updatedAt, "updatedAt"); this.updatedAt = updatedAt; return this; @@ -738,12 +1367,128 @@ public class GetRecentlyAddedMetadata { return this; } + public GetRecentlyAddedMetadata withGrandparentRatingKey(String grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); + return this; + } + + public GetRecentlyAddedMetadata withGrandparentRatingKey(Optional grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = grandparentRatingKey; + return this; + } + + public GetRecentlyAddedMetadata withGrandparentGuid(String grandparentGuid) { + Utils.checkNotNull(grandparentGuid, "grandparentGuid"); + this.grandparentGuid = Optional.ofNullable(grandparentGuid); + return this; + } + + public GetRecentlyAddedMetadata withGrandparentGuid(Optional grandparentGuid) { + Utils.checkNotNull(grandparentGuid, "grandparentGuid"); + this.grandparentGuid = grandparentGuid; + return this; + } + + public GetRecentlyAddedMetadata withGrandparentKey(String grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = Optional.ofNullable(grandparentKey); + return this; + } + + public GetRecentlyAddedMetadata withGrandparentKey(Optional grandparentKey) { + Utils.checkNotNull(grandparentKey, "grandparentKey"); + this.grandparentKey = grandparentKey; + return this; + } + + public GetRecentlyAddedMetadata withGrandparentTitle(String grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = Optional.ofNullable(grandparentTitle); + return this; + } + + public GetRecentlyAddedMetadata withGrandparentTitle(Optional grandparentTitle) { + Utils.checkNotNull(grandparentTitle, "grandparentTitle"); + this.grandparentTitle = grandparentTitle; + return this; + } + + public GetRecentlyAddedMetadata withGrandparentThumb(String grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = Optional.ofNullable(grandparentThumb); + return this; + } + + public GetRecentlyAddedMetadata withGrandparentThumb(Optional grandparentThumb) { + Utils.checkNotNull(grandparentThumb, "grandparentThumb"); + this.grandparentThumb = grandparentThumb; + return this; + } + + public GetRecentlyAddedMetadata withParentSlug(String parentSlug) { + Utils.checkNotNull(parentSlug, "parentSlug"); + this.parentSlug = Optional.ofNullable(parentSlug); + return this; + } + + public GetRecentlyAddedMetadata withParentSlug(Optional parentSlug) { + Utils.checkNotNull(parentSlug, "parentSlug"); + this.parentSlug = parentSlug; + return this; + } + + public GetRecentlyAddedMetadata withGrandparentSlug(String grandparentSlug) { + Utils.checkNotNull(grandparentSlug, "grandparentSlug"); + this.grandparentSlug = Optional.ofNullable(grandparentSlug); + return this; + } + + public GetRecentlyAddedMetadata withGrandparentSlug(Optional grandparentSlug) { + Utils.checkNotNull(grandparentSlug, "grandparentSlug"); + this.grandparentSlug = grandparentSlug; + return this; + } + + public GetRecentlyAddedMetadata withGrandparentArt(String grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = Optional.ofNullable(grandparentArt); + return this; + } + + public GetRecentlyAddedMetadata withGrandparentArt(Optional grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = grandparentArt; + return this; + } + + public GetRecentlyAddedMetadata withGrandparentTheme(String grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = Optional.ofNullable(grandparentTheme); + return this; + } + + public GetRecentlyAddedMetadata withGrandparentTheme(Optional grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = grandparentTheme; + return this; + } + + /** + * The Media object is only included when type query is `4` or higher. + * + */ public GetRecentlyAddedMetadata 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 GetRecentlyAddedMetadata withMedia(Optional> media) { Utils.checkNotNull(media, "media"); this.media = media; @@ -762,6 +1507,18 @@ public class GetRecentlyAddedMetadata { return this; } + public GetRecentlyAddedMetadata withCountry(List country) { + Utils.checkNotNull(country, "country"); + this.country = Optional.ofNullable(country); + return this; + } + + public GetRecentlyAddedMetadata withCountry(Optional> country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + public GetRecentlyAddedMetadata withDirector(List director) { Utils.checkNotNull(director, "director"); this.director = Optional.ofNullable(director); @@ -786,15 +1543,15 @@ public class GetRecentlyAddedMetadata { return this; } - public GetRecentlyAddedMetadata withCountry(List country) { - Utils.checkNotNull(country, "country"); - this.country = Optional.ofNullable(country); + public GetRecentlyAddedMetadata withCollection(List collection) { + Utils.checkNotNull(collection, "collection"); + this.collection = Optional.ofNullable(collection); return this; } - public GetRecentlyAddedMetadata withCountry(Optional> country) { - Utils.checkNotNull(country, "country"); - this.country = country; + public GetRecentlyAddedMetadata withCollection(Optional> collection) { + Utils.checkNotNull(collection, "collection"); + this.collection = collection; return this; } @@ -809,6 +1566,334 @@ public class GetRecentlyAddedMetadata { this.role = role; return this; } + + /** + * The Guid object is only included in the response if the `includeGuids` parameter is set to `1`. + * + */ + public GetRecentlyAddedMetadata 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 GetRecentlyAddedMetadata withMediaGuid(Optional> mediaGuid) { + Utils.checkNotNull(mediaGuid, "mediaGuid"); + this.mediaGuid = mediaGuid; + return this; + } + + public GetRecentlyAddedMetadata withUltraBlurColors(UltraBlurColors ultraBlurColors) { + Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); + this.ultraBlurColors = Optional.ofNullable(ultraBlurColors); + return this; + } + + public GetRecentlyAddedMetadata withUltraBlurColors(Optional ultraBlurColors) { + Utils.checkNotNull(ultraBlurColors, "ultraBlurColors"); + this.ultraBlurColors = ultraBlurColors; + return this; + } + + public GetRecentlyAddedMetadata withMetaDataRating(List metaDataRating) { + Utils.checkNotNull(metaDataRating, "metaDataRating"); + this.metaDataRating = Optional.ofNullable(metaDataRating); + return this; + } + + public GetRecentlyAddedMetadata withMetaDataRating(Optional> metaDataRating) { + Utils.checkNotNull(metaDataRating, "metaDataRating"); + this.metaDataRating = metaDataRating; + return this; + } + + public GetRecentlyAddedMetadata withImage(List image) { + Utils.checkNotNull(image, "image"); + this.image = Optional.ofNullable(image); + return this; + } + + public GetRecentlyAddedMetadata withImage(Optional> image) { + Utils.checkNotNull(image, "image"); + this.image = image; + return this; + } + + public GetRecentlyAddedMetadata withTitleSort(String titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = Optional.ofNullable(titleSort); + return this; + } + + public GetRecentlyAddedMetadata withTitleSort(Optional titleSort) { + Utils.checkNotNull(titleSort, "titleSort"); + this.titleSort = titleSort; + return this; + } + + public GetRecentlyAddedMetadata withViewCount(int viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = Optional.ofNullable(viewCount); + return this; + } + + public GetRecentlyAddedMetadata withViewCount(Optional viewCount) { + Utils.checkNotNull(viewCount, "viewCount"); + this.viewCount = viewCount; + return this; + } + + public GetRecentlyAddedMetadata withLastViewedAt(int lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = Optional.ofNullable(lastViewedAt); + return this; + } + + public GetRecentlyAddedMetadata withLastViewedAt(Optional lastViewedAt) { + Utils.checkNotNull(lastViewedAt, "lastViewedAt"); + this.lastViewedAt = lastViewedAt; + return this; + } + + public GetRecentlyAddedMetadata withOriginalTitle(String originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = Optional.ofNullable(originalTitle); + return this; + } + + public GetRecentlyAddedMetadata withOriginalTitle(Optional originalTitle) { + Utils.checkNotNull(originalTitle, "originalTitle"); + this.originalTitle = originalTitle; + return this; + } + + public GetRecentlyAddedMetadata withViewOffset(int viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = Optional.ofNullable(viewOffset); + return this; + } + + public GetRecentlyAddedMetadata withViewOffset(Optional viewOffset) { + Utils.checkNotNull(viewOffset, "viewOffset"); + this.viewOffset = viewOffset; + return this; + } + + public GetRecentlyAddedMetadata withSkipCount(int skipCount) { + Utils.checkNotNull(skipCount, "skipCount"); + this.skipCount = Optional.ofNullable(skipCount); + return this; + } + + public GetRecentlyAddedMetadata withSkipCount(Optional skipCount) { + Utils.checkNotNull(skipCount, "skipCount"); + this.skipCount = skipCount; + return this; + } + + public GetRecentlyAddedMetadata withIndex(int index) { + Utils.checkNotNull(index, "index"); + this.index = Optional.ofNullable(index); + return this; + } + + public GetRecentlyAddedMetadata withIndex(Optional index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + public GetRecentlyAddedMetadata withTheme(String theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = Optional.ofNullable(theme); + return this; + } + + public GetRecentlyAddedMetadata withTheme(Optional theme) { + Utils.checkNotNull(theme, "theme"); + this.theme = theme; + return this; + } + + public GetRecentlyAddedMetadata withLeafCount(int leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = Optional.ofNullable(leafCount); + return this; + } + + public GetRecentlyAddedMetadata withLeafCount(Optional leafCount) { + Utils.checkNotNull(leafCount, "leafCount"); + this.leafCount = leafCount; + return this; + } + + public GetRecentlyAddedMetadata withViewedLeafCount(int viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = Optional.ofNullable(viewedLeafCount); + return this; + } + + public GetRecentlyAddedMetadata withViewedLeafCount(Optional viewedLeafCount) { + Utils.checkNotNull(viewedLeafCount, "viewedLeafCount"); + this.viewedLeafCount = viewedLeafCount; + return this; + } + + public GetRecentlyAddedMetadata withChildCount(int childCount) { + Utils.checkNotNull(childCount, "childCount"); + this.childCount = Optional.ofNullable(childCount); + return this; + } + + public GetRecentlyAddedMetadata withChildCount(Optional childCount) { + Utils.checkNotNull(childCount, "childCount"); + this.childCount = childCount; + return this; + } + + public GetRecentlyAddedMetadata withHasPremiumExtras(String hasPremiumExtras) { + Utils.checkNotNull(hasPremiumExtras, "hasPremiumExtras"); + this.hasPremiumExtras = Optional.ofNullable(hasPremiumExtras); + return this; + } + + public GetRecentlyAddedMetadata withHasPremiumExtras(Optional hasPremiumExtras) { + Utils.checkNotNull(hasPremiumExtras, "hasPremiumExtras"); + this.hasPremiumExtras = hasPremiumExtras; + return this; + } + + public GetRecentlyAddedMetadata withHasPremiumPrimaryExtra(String hasPremiumPrimaryExtra) { + Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra"); + this.hasPremiumPrimaryExtra = Optional.ofNullable(hasPremiumPrimaryExtra); + return this; + } + + public GetRecentlyAddedMetadata withHasPremiumPrimaryExtra(Optional hasPremiumPrimaryExtra) { + Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra"); + this.hasPremiumPrimaryExtra = hasPremiumPrimaryExtra; + return this; + } + + /** + * The rating key of the parent item. + * + */ + public GetRecentlyAddedMetadata withParentRatingKey(String parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = Optional.ofNullable(parentRatingKey); + return this; + } + + /** + * The rating key of the parent item. + * + */ + public GetRecentlyAddedMetadata withParentRatingKey(Optional parentRatingKey) { + Utils.checkNotNull(parentRatingKey, "parentRatingKey"); + this.parentRatingKey = parentRatingKey; + return this; + } + + public GetRecentlyAddedMetadata withParentGuid(String parentGuid) { + Utils.checkNotNull(parentGuid, "parentGuid"); + this.parentGuid = Optional.ofNullable(parentGuid); + return this; + } + + public GetRecentlyAddedMetadata withParentGuid(Optional parentGuid) { + Utils.checkNotNull(parentGuid, "parentGuid"); + this.parentGuid = parentGuid; + return this; + } + + public GetRecentlyAddedMetadata withParentStudio(String parentStudio) { + Utils.checkNotNull(parentStudio, "parentStudio"); + this.parentStudio = Optional.ofNullable(parentStudio); + return this; + } + + public GetRecentlyAddedMetadata withParentStudio(Optional parentStudio) { + Utils.checkNotNull(parentStudio, "parentStudio"); + this.parentStudio = parentStudio; + return this; + } + + public GetRecentlyAddedMetadata withParentKey(String parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = Optional.ofNullable(parentKey); + return this; + } + + public GetRecentlyAddedMetadata withParentKey(Optional parentKey) { + Utils.checkNotNull(parentKey, "parentKey"); + this.parentKey = parentKey; + return this; + } + + public GetRecentlyAddedMetadata withParentTitle(String parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = Optional.ofNullable(parentTitle); + return this; + } + + public GetRecentlyAddedMetadata withParentTitle(Optional parentTitle) { + Utils.checkNotNull(parentTitle, "parentTitle"); + this.parentTitle = parentTitle; + return this; + } + + public GetRecentlyAddedMetadata withParentIndex(int parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = Optional.ofNullable(parentIndex); + return this; + } + + public GetRecentlyAddedMetadata withParentIndex(Optional parentIndex) { + Utils.checkNotNull(parentIndex, "parentIndex"); + this.parentIndex = parentIndex; + return this; + } + + public GetRecentlyAddedMetadata withParentYear(int parentYear) { + Utils.checkNotNull(parentYear, "parentYear"); + this.parentYear = Optional.ofNullable(parentYear); + return this; + } + + public GetRecentlyAddedMetadata withParentYear(Optional parentYear) { + Utils.checkNotNull(parentYear, "parentYear"); + this.parentYear = parentYear; + return this; + } + + public GetRecentlyAddedMetadata withParentThumb(String parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = Optional.ofNullable(parentThumb); + return this; + } + + public GetRecentlyAddedMetadata withParentThumb(Optional parentThumb) { + Utils.checkNotNull(parentThumb, "parentThumb"); + this.parentThumb = parentThumb; + return this; + } + + public GetRecentlyAddedMetadata withParentTheme(String parentTheme) { + Utils.checkNotNull(parentTheme, "parentTheme"); + this.parentTheme = Optional.ofNullable(parentTheme); + return this; + } + + public GetRecentlyAddedMetadata withParentTheme(Optional parentTheme) { + Utils.checkNotNull(parentTheme, "parentTheme"); + this.parentTheme = parentTheme; + return this; + } @Override public boolean equals(java.lang.Object o) { @@ -820,24 +1905,29 @@ public class GetRecentlyAddedMetadata { } GetRecentlyAddedMetadata other = (GetRecentlyAddedMetadata) o; return - Objects.deepEquals(this.allowSync, other.allowSync) && - Objects.deepEquals(this.librarySectionID, other.librarySectionID) && - Objects.deepEquals(this.librarySectionTitle, other.librarySectionTitle) && - Objects.deepEquals(this.librarySectionUUID, other.librarySectionUUID) && Objects.deepEquals(this.ratingKey, other.ratingKey) && Objects.deepEquals(this.key, other.key) && Objects.deepEquals(this.guid, other.guid) && 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.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.showOrdering, other.showOrdering) && Objects.deepEquals(this.thumb, other.thumb) && Objects.deepEquals(this.art, other.art) && + Objects.deepEquals(this.banner, other.banner) && Objects.deepEquals(this.duration, other.duration) && Objects.deepEquals(this.originallyAvailableAt, other.originallyAvailableAt) && Objects.deepEquals(this.addedAt, other.addedAt) && @@ -846,35 +1936,76 @@ public class GetRecentlyAddedMetadata { Objects.deepEquals(this.chapterSource, other.chapterSource) && Objects.deepEquals(this.primaryExtraKey, other.primaryExtraKey) && Objects.deepEquals(this.ratingImage, other.ratingImage) && + Objects.deepEquals(this.grandparentRatingKey, other.grandparentRatingKey) && + Objects.deepEquals(this.grandparentGuid, other.grandparentGuid) && + Objects.deepEquals(this.grandparentKey, other.grandparentKey) && + 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.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.country, other.country) && - Objects.deepEquals(this.role, other.role); + Objects.deepEquals(this.collection, other.collection) && + Objects.deepEquals(this.role, other.role) && + 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); } @Override public int hashCode() { return Objects.hash( - allowSync, - librarySectionID, - librarySectionTitle, - librarySectionUUID, ratingKey, key, guid, studio, + skipChildren, + librarySectionID, + librarySectionTitle, + librarySectionKey, type, title, + slug, contentRating, summary, rating, audienceRating, year, + seasonCount, tagline, + flattenSeasons, + showOrdering, thumb, art, + banner, duration, originallyAvailableAt, addedAt, @@ -883,35 +2014,76 @@ public class GetRecentlyAddedMetadata { chapterSource, primaryExtraKey, ratingImage, + grandparentRatingKey, + grandparentGuid, + grandparentKey, + grandparentTitle, + grandparentThumb, + parentSlug, + grandparentSlug, + grandparentArt, + grandparentTheme, media, genre, + country, director, writer, - country, - role); + collection, + role, + 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); } @Override public String toString() { return Utils.toString(GetRecentlyAddedMetadata.class, - "allowSync", allowSync, - "librarySectionID", librarySectionID, - "librarySectionTitle", librarySectionTitle, - "librarySectionUUID", librarySectionUUID, "ratingKey", ratingKey, "key", key, "guid", guid, "studio", studio, + "skipChildren", skipChildren, + "librarySectionID", librarySectionID, + "librarySectionTitle", librarySectionTitle, + "librarySectionKey", librarySectionKey, "type", type, "title", title, + "slug", slug, "contentRating", contentRating, "summary", summary, "rating", rating, "audienceRating", audienceRating, "year", year, + "seasonCount", seasonCount, "tagline", tagline, + "flattenSeasons", flattenSeasons, + "showOrdering", showOrdering, "thumb", thumb, "art", art, + "banner", banner, "duration", duration, "originallyAvailableAt", originallyAvailableAt, "addedAt", addedAt, @@ -920,59 +2092,105 @@ public class GetRecentlyAddedMetadata { "chapterSource", chapterSource, "primaryExtraKey", primaryExtraKey, "ratingImage", ratingImage, + "grandparentRatingKey", grandparentRatingKey, + "grandparentGuid", grandparentGuid, + "grandparentKey", grandparentKey, + "grandparentTitle", grandparentTitle, + "grandparentThumb", grandparentThumb, + "parentSlug", parentSlug, + "grandparentSlug", grandparentSlug, + "grandparentArt", grandparentArt, + "grandparentTheme", grandparentTheme, "media", media, "genre", genre, + "country", country, "director", director, "writer", writer, - "country", country, - "role", role); + "collection", collection, + "role", role, + "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); } public final static class Builder { - private Optional allowSync = Optional.empty(); + private String ratingKey; - private Optional librarySectionID = Optional.empty(); + private String key; - private Optional librarySectionTitle = Optional.empty(); - - private Optional librarySectionUUID = Optional.empty(); - - private Optional ratingKey = Optional.empty(); - - private Optional key = Optional.empty(); - - private Optional guid = Optional.empty(); + private String guid; private Optional studio = Optional.empty(); - private Optional type = Optional.empty(); + private Optional skipChildren = Optional.empty(); - private Optional title = Optional.empty(); + private Optional librarySectionID = Optional.empty(); + + private Optional librarySectionTitle = Optional.empty(); + + private Optional librarySectionKey = Optional.empty(); + + private GetRecentlyAddedHubsType type; + + private String title; + + private Optional slug = Optional.empty(); private Optional contentRating = Optional.empty(); - private Optional summary = Optional.empty(); + private String summary; private Optional rating = Optional.empty(); private Optional audienceRating = Optional.empty(); - private Optional year = Optional.empty(); + private Optional year = Optional.empty(); + + private Optional seasonCount = Optional.empty(); private Optional tagline = Optional.empty(); + private Optional flattenSeasons; + + private Optional showOrdering = Optional.empty(); + private Optional thumb = Optional.empty(); private Optional art = Optional.empty(); - private Optional duration = Optional.empty(); + private Optional banner = Optional.empty(); - private Optional originallyAvailableAt = Optional.empty(); + private Optional duration = Optional.empty(); - private Optional addedAt = Optional.empty(); + private Optional originallyAvailableAt = Optional.empty(); - private Optional updatedAt = Optional.empty(); + private Long addedAt; + + private Optional updatedAt = Optional.empty(); private Optional audienceRatingImage = Optional.empty(); @@ -982,101 +2200,112 @@ public class GetRecentlyAddedMetadata { private Optional ratingImage = Optional.empty(); + private Optional grandparentRatingKey = Optional.empty(); + + private Optional grandparentGuid = Optional.empty(); + + private Optional grandparentKey = Optional.empty(); + + private Optional grandparentTitle = Optional.empty(); + + private Optional grandparentThumb = Optional.empty(); + + private Optional parentSlug = Optional.empty(); + + private Optional grandparentSlug = Optional.empty(); + + private Optional grandparentArt = Optional.empty(); + + private Optional grandparentTheme = Optional.empty(); + private Optional> media = Optional.empty(); private Optional> genre = Optional.empty(); + private Optional> country = Optional.empty(); + private Optional> director = Optional.empty(); private Optional> writer = Optional.empty(); - private Optional> country = Optional.empty(); + private Optional> collection = Optional.empty(); - private Optional> role = Optional.empty(); + private Optional> role = 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 } - public Builder allowSync(boolean allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = Optional.ofNullable(allowSync); - return this; - } - - public Builder allowSync(Optional allowSync) { - Utils.checkNotNull(allowSync, "allowSync"); - this.allowSync = allowSync; - return this; - } - - public Builder librarySectionID(double 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 librarySectionUUID(String librarySectionUUID) { - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - this.librarySectionUUID = Optional.ofNullable(librarySectionUUID); - return this; - } - - public Builder librarySectionUUID(Optional librarySectionUUID) { - Utils.checkNotNull(librarySectionUUID, "librarySectionUUID"); - this.librarySectionUUID = librarySectionUUID; - return this; - } - - public Builder ratingKey(double ratingKey) { - Utils.checkNotNull(ratingKey, "ratingKey"); - this.ratingKey = Optional.ofNullable(ratingKey); - return this; - } - - public Builder ratingKey(Optional ratingKey) { + /** + * The rating key (Media ID) of this media item. + * Note: This is always an integer, but is represented as a string in the API. + * + */ + public Builder ratingKey(String ratingKey) { Utils.checkNotNull(ratingKey, "ratingKey"); this.ratingKey = ratingKey; return this; } public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - public Builder key(Optional key) { Utils.checkNotNull(key, "key"); this.key = key; return this; } public Builder guid(String guid) { - Utils.checkNotNull(guid, "guid"); - this.guid = Optional.ofNullable(guid); - return this; - } - - public Builder guid(Optional guid) { Utils.checkNotNull(guid, "guid"); this.guid = guid; return this; @@ -1094,13 +2323,59 @@ public class GetRecentlyAddedMetadata { return this; } - public Builder type(String type) { - Utils.checkNotNull(type, "type"); - this.type = Optional.ofNullable(type); + public Builder skipChildren(boolean skipChildren) { + Utils.checkNotNull(skipChildren, "skipChildren"); + this.skipChildren = Optional.ofNullable(skipChildren); return this; } - public Builder type(Optional type) { + 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 + * + */ + public Builder type(GetRecentlyAddedHubsType type) { Utils.checkNotNull(type, "type"); this.type = type; return this; @@ -1108,13 +2383,19 @@ public class GetRecentlyAddedMetadata { public Builder title(String title) { Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); + this.title = title; return this; } - public Builder title(Optional title) { - Utils.checkNotNull(title, "title"); - this.title = title; + public Builder slug(String slug) { + Utils.checkNotNull(slug, "slug"); + this.slug = Optional.ofNullable(slug); + return this; + } + + public Builder slug(Optional slug) { + Utils.checkNotNull(slug, "slug"); + this.slug = slug; return this; } @@ -1131,12 +2412,6 @@ public class GetRecentlyAddedMetadata { } public Builder summary(String summary) { - Utils.checkNotNull(summary, "summary"); - this.summary = Optional.ofNullable(summary); - return this; - } - - public Builder summary(Optional summary) { Utils.checkNotNull(summary, "summary"); this.summary = summary; return this; @@ -1166,18 +2441,30 @@ public class GetRecentlyAddedMetadata { return this; } - public Builder year(double year) { + public Builder year(int year) { Utils.checkNotNull(year, "year"); this.year = Optional.ofNullable(year); return this; } - public Builder year(Optional year) { + 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; + } + public Builder tagline(String tagline) { Utils.checkNotNull(tagline, "tagline"); this.tagline = Optional.ofNullable(tagline); @@ -1190,6 +2477,48 @@ public class GetRecentlyAddedMetadata { return this; } + public Builder flattenSeasons(FlattenSeasons flattenSeasons) { + Utils.checkNotNull(flattenSeasons, "flattenSeasons"); + this.flattenSeasons = Optional.ofNullable(flattenSeasons); + return this; + } + + public Builder flattenSeasons(Optional flattenSeasons) { + Utils.checkNotNull(flattenSeasons, "flattenSeasons"); + this.flattenSeasons = flattenSeasons; + 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); @@ -1214,49 +2543,64 @@ public class GetRecentlyAddedMetadata { return this; } - public Builder duration(double duration) { + public Builder banner(String banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = Optional.ofNullable(banner); + return this; + } + + public Builder banner(Optional banner) { + Utils.checkNotNull(banner, "banner"); + this.banner = banner; + return this; + } + + public Builder duration(int duration) { Utils.checkNotNull(duration, "duration"); this.duration = Optional.ofNullable(duration); return this; } - public Builder duration(Optional duration) { + public Builder duration(Optional duration) { Utils.checkNotNull(duration, "duration"); this.duration = duration; return this; } - public Builder originallyAvailableAt(OffsetDateTime originallyAvailableAt) { + public Builder originallyAvailableAt(LocalDate originallyAvailableAt) { Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt); return this; } - public Builder originallyAvailableAt(Optional originallyAvailableAt) { + public Builder originallyAvailableAt(Optional originallyAvailableAt) { Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt"); this.originallyAvailableAt = originallyAvailableAt; return this; } - public Builder addedAt(double addedAt) { - Utils.checkNotNull(addedAt, "addedAt"); - this.addedAt = Optional.ofNullable(addedAt); - return this; - } - - public Builder addedAt(Optional addedAt) { + /** + * Unix epoch datetime in seconds + */ + public Builder addedAt(long addedAt) { Utils.checkNotNull(addedAt, "addedAt"); this.addedAt = addedAt; return this; } - public Builder updatedAt(double updatedAt) { + /** + * Unix epoch datetime in seconds + */ + public Builder updatedAt(long updatedAt) { Utils.checkNotNull(updatedAt, "updatedAt"); this.updatedAt = Optional.ofNullable(updatedAt); return this; } - public Builder updatedAt(Optional updatedAt) { + /** + * Unix epoch datetime in seconds + */ + public Builder updatedAt(Optional updatedAt) { Utils.checkNotNull(updatedAt, "updatedAt"); this.updatedAt = updatedAt; return this; @@ -1310,12 +2654,128 @@ public class GetRecentlyAddedMetadata { return this; } + public Builder grandparentRatingKey(String grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey); + return this; + } + + public Builder grandparentRatingKey(Optional grandparentRatingKey) { + Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey"); + this.grandparentRatingKey = grandparentRatingKey; + return this; + } + + public Builder grandparentGuid(String grandparentGuid) { + Utils.checkNotNull(grandparentGuid, "grandparentGuid"); + this.grandparentGuid = Optional.ofNullable(grandparentGuid); + return this; + } + + 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; + } + + public Builder grandparentSlug(String grandparentSlug) { + Utils.checkNotNull(grandparentSlug, "grandparentSlug"); + this.grandparentSlug = Optional.ofNullable(grandparentSlug); + return this; + } + + 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); + return this; + } + + public Builder grandparentArt(Optional grandparentArt) { + Utils.checkNotNull(grandparentArt, "grandparentArt"); + this.grandparentArt = grandparentArt; + return this; + } + + public Builder grandparentTheme(String grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = Optional.ofNullable(grandparentTheme); + return this; + } + + public Builder grandparentTheme(Optional grandparentTheme) { + Utils.checkNotNull(grandparentTheme, "grandparentTheme"); + this.grandparentTheme = grandparentTheme; + return this; + } + + /** + * The Media object is only included when type query is `4` or higher. + * + */ 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; @@ -1334,6 +2794,18 @@ public class GetRecentlyAddedMetadata { return this; } + public Builder country(List country) { + Utils.checkNotNull(country, "country"); + this.country = Optional.ofNullable(country); + return this; + } + + public Builder country(Optional> country) { + Utils.checkNotNull(country, "country"); + this.country = country; + return this; + } + public Builder director(List director) { Utils.checkNotNull(director, "director"); this.director = Optional.ofNullable(director); @@ -1358,15 +2830,15 @@ public class GetRecentlyAddedMetadata { return this; } - public Builder country(List country) { - Utils.checkNotNull(country, "country"); - this.country = Optional.ofNullable(country); + public Builder collection(List collection) { + Utils.checkNotNull(collection, "collection"); + this.collection = Optional.ofNullable(collection); return this; } - public Builder country(Optional> country) { - Utils.checkNotNull(country, "country"); - this.country = country; + public Builder collection(Optional> collection) { + Utils.checkNotNull(collection, "collection"); + this.collection = collection; return this; } @@ -1381,27 +2853,362 @@ public class GetRecentlyAddedMetadata { this.role = role; 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(UltraBlurColors 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 GetRecentlyAddedMetadata build() { - return new GetRecentlyAddedMetadata( - allowSync, - librarySectionID, - librarySectionTitle, - librarySectionUUID, + if (flattenSeasons == null) { + flattenSeasons = _SINGLETON_VALUE_FlattenSeasons.value(); + } return new GetRecentlyAddedMetadata( ratingKey, key, guid, studio, + skipChildren, + librarySectionID, + librarySectionTitle, + librarySectionKey, type, title, + slug, contentRating, summary, rating, audienceRating, year, + seasonCount, tagline, + flattenSeasons, + showOrdering, thumb, art, + banner, duration, originallyAvailableAt, addedAt, @@ -1410,13 +3217,55 @@ public class GetRecentlyAddedMetadata { chapterSource, primaryExtraKey, ratingImage, + grandparentRatingKey, + grandparentGuid, + grandparentKey, + grandparentTitle, + grandparentThumb, + parentSlug, + grandparentSlug, + grandparentArt, + grandparentTheme, media, genre, + country, director, writer, - country, - role); + collection, + role, + 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); } + + private static final LazySingletonValue> _SINGLETON_VALUE_FlattenSeasons = + new LazySingletonValue<>( + "flattenSeasons", + "\"0\"", + new TypeReference>() {}); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedOperator.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedOperator.java new file mode 100644 index 00000000..5f2d5d47 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedOperator.java @@ -0,0 +1,118 @@ +/* + * 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 GetRecentlyAddedOperator { + + @JsonProperty("key") + private String key; + + @JsonProperty("title") + private String title; + + @JsonCreator + public GetRecentlyAddedOperator( + @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 GetRecentlyAddedOperator withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetRecentlyAddedOperator 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; + } + GetRecentlyAddedOperator other = (GetRecentlyAddedOperator) 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(GetRecentlyAddedOperator.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 GetRecentlyAddedOperator build() { + return new GetRecentlyAddedOperator( + key, + title); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedRequest.java index 48803a14..9b8201f3 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedRequest.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedRequest.java @@ -12,14 +12,53 @@ import dev.plexapi.sdk.utils.LazySingletonValue; import dev.plexapi.sdk.utils.SpeakeasyMetadata; import dev.plexapi.sdk.utils.Utils; import java.lang.Integer; +import java.lang.Long; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; import java.util.Objects; import java.util.Optional; public class GetRecentlyAddedRequest { + /** + * The content directory ID. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=contentDirectoryID") + private long contentDirectoryID; + + /** + * Comma-separated list of pinned content directory IDs. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=pinnedContentDirectoryID") + private Optional pinnedContentDirectoryID; + + /** + * The library section ID for filtering content. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=sectionID") + private Optional sectionID; + + /** + * The type of media to retrieve. + * 1 = movie + * 2 = show + * 3 = season + * 4 = episode + * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + * + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") + private Type type; + + /** + * Adds the Meta object to the response + * + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeMeta") + private Optional includeMeta; + /** * The index of the first item to return. If not specified, the first item will be returned. * If the number of items exceeds the limit, the response will be paginated. @@ -40,16 +79,81 @@ public class GetRecentlyAddedRequest { @JsonCreator public GetRecentlyAddedRequest( + long contentDirectoryID, + Optional pinnedContentDirectoryID, + Optional sectionID, + Type type, + Optional includeMeta, Optional xPlexContainerStart, Optional xPlexContainerSize) { + Utils.checkNotNull(contentDirectoryID, "contentDirectoryID"); + Utils.checkNotNull(pinnedContentDirectoryID, "pinnedContentDirectoryID"); + Utils.checkNotNull(sectionID, "sectionID"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(includeMeta, "includeMeta"); Utils.checkNotNull(xPlexContainerStart, "xPlexContainerStart"); Utils.checkNotNull(xPlexContainerSize, "xPlexContainerSize"); + this.contentDirectoryID = contentDirectoryID; + this.pinnedContentDirectoryID = pinnedContentDirectoryID; + this.sectionID = sectionID; + this.type = type; + this.includeMeta = includeMeta; this.xPlexContainerStart = xPlexContainerStart; this.xPlexContainerSize = xPlexContainerSize; } - public GetRecentlyAddedRequest() { - this(Optional.empty(), Optional.empty()); + public GetRecentlyAddedRequest( + long contentDirectoryID, + Type type) { + this(contentDirectoryID, Optional.empty(), Optional.empty(), type, Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * The content directory ID. + */ + @JsonIgnore + public long contentDirectoryID() { + return contentDirectoryID; + } + + /** + * Comma-separated list of pinned content directory IDs. + */ + @JsonIgnore + public Optional pinnedContentDirectoryID() { + return pinnedContentDirectoryID; + } + + /** + * The library section ID for filtering content. + */ + @JsonIgnore + public Optional sectionID() { + return sectionID; + } + + /** + * The type of media to retrieve. + * 1 = movie + * 2 = show + * 3 = season + * 4 = episode + * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + * + */ + @JsonIgnore + public Type type() { + return type; + } + + /** + * Adds the Meta object to the response + * + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional includeMeta() { + return (Optional) includeMeta; } /** @@ -78,6 +182,86 @@ public class GetRecentlyAddedRequest { return new Builder(); } + /** + * The content directory ID. + */ + public GetRecentlyAddedRequest withContentDirectoryID(long contentDirectoryID) { + Utils.checkNotNull(contentDirectoryID, "contentDirectoryID"); + this.contentDirectoryID = contentDirectoryID; + return this; + } + + /** + * Comma-separated list of pinned content directory IDs. + */ + public GetRecentlyAddedRequest withPinnedContentDirectoryID(String pinnedContentDirectoryID) { + Utils.checkNotNull(pinnedContentDirectoryID, "pinnedContentDirectoryID"); + this.pinnedContentDirectoryID = Optional.ofNullable(pinnedContentDirectoryID); + return this; + } + + /** + * Comma-separated list of pinned content directory IDs. + */ + public GetRecentlyAddedRequest withPinnedContentDirectoryID(Optional pinnedContentDirectoryID) { + Utils.checkNotNull(pinnedContentDirectoryID, "pinnedContentDirectoryID"); + this.pinnedContentDirectoryID = pinnedContentDirectoryID; + return this; + } + + /** + * The library section ID for filtering content. + */ + public GetRecentlyAddedRequest withSectionID(long sectionID) { + Utils.checkNotNull(sectionID, "sectionID"); + this.sectionID = Optional.ofNullable(sectionID); + return this; + } + + /** + * The library section ID for filtering content. + */ + public GetRecentlyAddedRequest withSectionID(Optional sectionID) { + Utils.checkNotNull(sectionID, "sectionID"); + this.sectionID = sectionID; + return this; + } + + /** + * The type of media to retrieve. + * 1 = movie + * 2 = show + * 3 = season + * 4 = episode + * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + * + */ + public GetRecentlyAddedRequest withType(Type type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * Adds the Meta object to the response + * + */ + public GetRecentlyAddedRequest withIncludeMeta(IncludeMeta includeMeta) { + Utils.checkNotNull(includeMeta, "includeMeta"); + this.includeMeta = Optional.ofNullable(includeMeta); + return this; + } + + /** + * Adds the Meta object to the response + * + */ + public GetRecentlyAddedRequest withIncludeMeta(Optional includeMeta) { + Utils.checkNotNull(includeMeta, "includeMeta"); + this.includeMeta = includeMeta; + return this; + } + /** * The index of the first item to return. If not specified, the first item will be returned. * If the number of items exceeds the limit, the response will be paginated. @@ -136,6 +320,11 @@ public class GetRecentlyAddedRequest { } GetRecentlyAddedRequest other = (GetRecentlyAddedRequest) o; return + Objects.deepEquals(this.contentDirectoryID, other.contentDirectoryID) && + Objects.deepEquals(this.pinnedContentDirectoryID, other.pinnedContentDirectoryID) && + Objects.deepEquals(this.sectionID, other.sectionID) && + Objects.deepEquals(this.type, other.type) && + Objects.deepEquals(this.includeMeta, other.includeMeta) && Objects.deepEquals(this.xPlexContainerStart, other.xPlexContainerStart) && Objects.deepEquals(this.xPlexContainerSize, other.xPlexContainerSize); } @@ -143,6 +332,11 @@ public class GetRecentlyAddedRequest { @Override public int hashCode() { return Objects.hash( + contentDirectoryID, + pinnedContentDirectoryID, + sectionID, + type, + includeMeta, xPlexContainerStart, xPlexContainerSize); } @@ -150,12 +344,27 @@ public class GetRecentlyAddedRequest { @Override public String toString() { return Utils.toString(GetRecentlyAddedRequest.class, + "contentDirectoryID", contentDirectoryID, + "pinnedContentDirectoryID", pinnedContentDirectoryID, + "sectionID", sectionID, + "type", type, + "includeMeta", includeMeta, "xPlexContainerStart", xPlexContainerStart, "xPlexContainerSize", xPlexContainerSize); } public final static class Builder { + private Long contentDirectoryID; + + private Optional pinnedContentDirectoryID = Optional.empty(); + + private Optional sectionID = Optional.empty(); + + private Type type; + + private Optional includeMeta; + private Optional xPlexContainerStart; private Optional xPlexContainerSize; @@ -164,6 +373,86 @@ public class GetRecentlyAddedRequest { // force use of static builder() method } + /** + * The content directory ID. + */ + public Builder contentDirectoryID(long contentDirectoryID) { + Utils.checkNotNull(contentDirectoryID, "contentDirectoryID"); + this.contentDirectoryID = contentDirectoryID; + return this; + } + + /** + * Comma-separated list of pinned content directory IDs. + */ + public Builder pinnedContentDirectoryID(String pinnedContentDirectoryID) { + Utils.checkNotNull(pinnedContentDirectoryID, "pinnedContentDirectoryID"); + this.pinnedContentDirectoryID = Optional.ofNullable(pinnedContentDirectoryID); + return this; + } + + /** + * Comma-separated list of pinned content directory IDs. + */ + public Builder pinnedContentDirectoryID(Optional pinnedContentDirectoryID) { + Utils.checkNotNull(pinnedContentDirectoryID, "pinnedContentDirectoryID"); + this.pinnedContentDirectoryID = pinnedContentDirectoryID; + return this; + } + + /** + * The library section ID for filtering content. + */ + public Builder sectionID(long sectionID) { + Utils.checkNotNull(sectionID, "sectionID"); + this.sectionID = Optional.ofNullable(sectionID); + return this; + } + + /** + * The library section ID for filtering content. + */ + public Builder sectionID(Optional sectionID) { + Utils.checkNotNull(sectionID, "sectionID"); + this.sectionID = sectionID; + return this; + } + + /** + * The type of media to retrieve. + * 1 = movie + * 2 = show + * 3 = season + * 4 = episode + * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + * + */ + public Builder type(Type type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * Adds the Meta object to the response + * + */ + public Builder includeMeta(IncludeMeta includeMeta) { + Utils.checkNotNull(includeMeta, "includeMeta"); + this.includeMeta = Optional.ofNullable(includeMeta); + return this; + } + + /** + * Adds the Meta object to the response + * + */ + public Builder includeMeta(Optional includeMeta) { + Utils.checkNotNull(includeMeta, "includeMeta"); + this.includeMeta = includeMeta; + return this; + } + /** * The index of the first item to return. If not specified, the first item will be returned. * If the number of items exceeds the limit, the response will be paginated. @@ -213,16 +502,30 @@ public class GetRecentlyAddedRequest { } public GetRecentlyAddedRequest build() { + if (includeMeta == null) { + includeMeta = _SINGLETON_VALUE_IncludeMeta.value(); + } if (xPlexContainerStart == null) { xPlexContainerStart = _SINGLETON_VALUE_XPlexContainerStart.value(); } if (xPlexContainerSize == null) { xPlexContainerSize = _SINGLETON_VALUE_XPlexContainerSize.value(); } return new GetRecentlyAddedRequest( + contentDirectoryID, + pinnedContentDirectoryID, + sectionID, + type, + includeMeta, xPlexContainerStart, xPlexContainerSize); } + private static final LazySingletonValue> _SINGLETON_VALUE_IncludeMeta = + new LazySingletonValue<>( + "includeMeta", + "0", + new TypeReference>() {}); + private static final LazySingletonValue> _SINGLETON_VALUE_XPlexContainerStart = new LazySingletonValue<>( "X-Plex-Container-Start", diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedRequestBuilder.java index ae791fa3..e7b3cadd 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedRequestBuilder.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedRequestBuilder.java @@ -4,73 +4,26 @@ package dev.plexapi.sdk.models.operations; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; import dev.plexapi.sdk.utils.Utils; -import java.lang.Integer; -import java.util.Optional; public class GetRecentlyAddedRequestBuilder { - private Optional xPlexContainerStart = Utils.readDefaultOrConstValue( - "xPlexContainerStart", - "0", - new TypeReference>() {}); - private Optional xPlexContainerSize = Utils.readDefaultOrConstValue( - "xPlexContainerSize", - "50", - new TypeReference>() {}); + private GetRecentlyAddedRequest request; private final SDKMethodInterfaces.MethodCallGetRecentlyAdded sdk; public GetRecentlyAddedRequestBuilder(SDKMethodInterfaces.MethodCallGetRecentlyAdded sdk) { this.sdk = sdk; } - - public GetRecentlyAddedRequestBuilder xPlexContainerStart(int xPlexContainerStart) { - Utils.checkNotNull(xPlexContainerStart, "xPlexContainerStart"); - this.xPlexContainerStart = Optional.of(xPlexContainerStart); - return this; - } - public GetRecentlyAddedRequestBuilder xPlexContainerStart(Optional xPlexContainerStart) { - Utils.checkNotNull(xPlexContainerStart, "xPlexContainerStart"); - this.xPlexContainerStart = xPlexContainerStart; - return this; - } - - public GetRecentlyAddedRequestBuilder xPlexContainerSize(int xPlexContainerSize) { - Utils.checkNotNull(xPlexContainerSize, "xPlexContainerSize"); - this.xPlexContainerSize = Optional.of(xPlexContainerSize); - return this; - } - - public GetRecentlyAddedRequestBuilder xPlexContainerSize(Optional xPlexContainerSize) { - Utils.checkNotNull(xPlexContainerSize, "xPlexContainerSize"); - this.xPlexContainerSize = xPlexContainerSize; + public GetRecentlyAddedRequestBuilder request(GetRecentlyAddedRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; return this; } public GetRecentlyAddedResponse call() throws Exception { - if (xPlexContainerStart == null) { - xPlexContainerStart = _SINGLETON_VALUE_XPlexContainerStart.value(); - } - if (xPlexContainerSize == null) { - xPlexContainerSize = _SINGLETON_VALUE_XPlexContainerSize.value(); - } + return sdk.getRecentlyAdded( - xPlexContainerStart, - xPlexContainerSize); + request); } - - private static final LazySingletonValue> _SINGLETON_VALUE_XPlexContainerStart = - new LazySingletonValue<>( - "xPlexContainerStart", - "0", - new TypeReference>() {}); - - private static final LazySingletonValue> _SINGLETON_VALUE_XPlexContainerSize = - new LazySingletonValue<>( - "xPlexContainerSize", - "50", - new TypeReference>() {}); } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedResponse.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedResponse.java index d0009eaa..89729ca2 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedResponse.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedResponse.java @@ -37,7 +37,7 @@ public class GetRecentlyAddedResponse implements Response { private HttpResponse rawResponse; /** - * The recently added content + * A successful response with recently added content. */ private Optional object; @@ -89,7 +89,7 @@ public class GetRecentlyAddedResponse implements Response { } /** - * The recently added content + * A successful response with recently added content. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -129,7 +129,7 @@ public class GetRecentlyAddedResponse implements Response { } /** - * The recently added content + * A successful response with recently added content. */ public GetRecentlyAddedResponse withObject(GetRecentlyAddedResponseBody object) { Utils.checkNotNull(object, "object"); @@ -138,7 +138,7 @@ public class GetRecentlyAddedResponse implements Response { } /** - * The recently added content + * A successful response with recently added content. */ public GetRecentlyAddedResponse withObject(Optional object) { Utils.checkNotNull(object, "object"); @@ -222,7 +222,7 @@ public class GetRecentlyAddedResponse implements Response { } /** - * The recently added content + * A successful response with recently added content. */ public Builder object(GetRecentlyAddedResponseBody object) { Utils.checkNotNull(object, "object"); @@ -231,7 +231,7 @@ public class GetRecentlyAddedResponse implements Response { } /** - * The recently added content + * A successful response with recently added content. */ public Builder object(Optional object) { Utils.checkNotNull(object, "object"); diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedResponseBody.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedResponseBody.java index 9dcbff79..5fc0b1f1 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedResponseBody.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedResponseBody.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; /** - * GetRecentlyAddedResponseBody - The recently added content + * GetRecentlyAddedResponseBody - A successful response with recently added content. */ public class GetRecentlyAddedResponseBody { diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedSort.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedSort.java new file mode 100644 index 00000000..5deffcaa --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedSort.java @@ -0,0 +1,450 @@ +/* + * 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 GetRecentlyAddedSort { + + @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 GetRecentlyAddedSort( + @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 GetRecentlyAddedSort( + 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 GetRecentlyAddedSort withDefault(String default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = Optional.ofNullable(default_); + return this; + } + + public GetRecentlyAddedSort withDefault(Optional default_) { + Utils.checkNotNull(default_, "default_"); + this.default_ = default_; + return this; + } + + public GetRecentlyAddedSort withActive(boolean active) { + Utils.checkNotNull(active, "active"); + this.active = Optional.ofNullable(active); + return this; + } + + public GetRecentlyAddedSort withActive(Optional active) { + Utils.checkNotNull(active, "active"); + this.active = active; + return this; + } + + /** + * The direction of the sort. Can be either `asc` or `desc`. + * + */ + public GetRecentlyAddedSort withActiveDirection(GetRecentlyAddedActiveDirection activeDirection) { + Utils.checkNotNull(activeDirection, "activeDirection"); + this.activeDirection = Optional.ofNullable(activeDirection); + return this; + } + + /** + * The direction of the sort. Can be either `asc` or `desc`. + * + */ + public GetRecentlyAddedSort withActiveDirection(Optional activeDirection) { + Utils.checkNotNull(activeDirection, "activeDirection"); + this.activeDirection = activeDirection; + return this; + } + + /** + * The direction of the sort. Can be either `asc` or `desc`. + * + */ + public GetRecentlyAddedSort withDefaultDirection(GetRecentlyAddedDefaultDirection defaultDirection) { + Utils.checkNotNull(defaultDirection, "defaultDirection"); + this.defaultDirection = Optional.ofNullable(defaultDirection); + return this; + } + + /** + * The direction of the sort. Can be either `asc` or `desc`. + * + */ + public GetRecentlyAddedSort withDefaultDirection(Optional defaultDirection) { + Utils.checkNotNull(defaultDirection, "defaultDirection"); + this.defaultDirection = defaultDirection; + return this; + } + + public GetRecentlyAddedSort withDescKey(String descKey) { + Utils.checkNotNull(descKey, "descKey"); + this.descKey = Optional.ofNullable(descKey); + return this; + } + + public GetRecentlyAddedSort withDescKey(Optional descKey) { + Utils.checkNotNull(descKey, "descKey"); + this.descKey = descKey; + return this; + } + + public GetRecentlyAddedSort withFirstCharacterKey(String firstCharacterKey) { + Utils.checkNotNull(firstCharacterKey, "firstCharacterKey"); + this.firstCharacterKey = Optional.ofNullable(firstCharacterKey); + return this; + } + + public GetRecentlyAddedSort withFirstCharacterKey(Optional firstCharacterKey) { + Utils.checkNotNull(firstCharacterKey, "firstCharacterKey"); + this.firstCharacterKey = firstCharacterKey; + return this; + } + + public GetRecentlyAddedSort withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetRecentlyAddedSort 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; + } + GetRecentlyAddedSort other = (GetRecentlyAddedSort) 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(GetRecentlyAddedSort.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(GetRecentlyAddedActiveDirection 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(GetRecentlyAddedDefaultDirection 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 GetRecentlyAddedSort build() { + if (activeDirection == null) { + activeDirection = _SINGLETON_VALUE_ActiveDirection.value(); + } + if (defaultDirection == null) { + defaultDirection = _SINGLETON_VALUE_DefaultDirection.value(); + } return new GetRecentlyAddedSort( + 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/GetRecentlyAddedType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedType.java new file mode 100644 index 00000000..fb0c402a --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetRecentlyAddedType.java @@ -0,0 +1,319 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + + +public class GetRecentlyAddedType { + + @JsonProperty("key") + private String key; + + @JsonProperty("type") + private String type; + + @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 GetRecentlyAddedType( + @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 GetRecentlyAddedType( + String key, + String type, + String title, + boolean active) { + this(key, type, title, active, Optional.empty(), Optional.empty(), Optional.empty()); + } + + @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 GetRecentlyAddedType withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public GetRecentlyAddedType withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public GetRecentlyAddedType withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public GetRecentlyAddedType withActive(boolean active) { + Utils.checkNotNull(active, "active"); + this.active = active; + return this; + } + + public GetRecentlyAddedType withFilter(List filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + public GetRecentlyAddedType withFilter(Optional> filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + public GetRecentlyAddedType withSort(List sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = Optional.ofNullable(sort); + return this; + } + + public GetRecentlyAddedType withSort(Optional> sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = sort; + return this; + } + + public GetRecentlyAddedType withField(List field) { + Utils.checkNotNull(field, "field"); + this.field = Optional.ofNullable(field); + return this; + } + + public GetRecentlyAddedType 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; + } + GetRecentlyAddedType other = (GetRecentlyAddedType) 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); + } + + @Override + public int hashCode() { + return Objects.hash( + key, + type, + title, + active, + filter, + sort, + field); + } + + @Override + public String toString() { + return Utils.toString(GetRecentlyAddedType.class, + "key", key, + "type", type, + "title", title, + "active", active, + "filter", filter, + "sort", sort, + "field", field); + } + + 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 + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = type; + 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 GetRecentlyAddedType build() { + return new GetRecentlyAddedType( + key, + type, + title, + active, + filter, + sort, + field); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryQueryParamType.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryQueryParamType.java new file mode 100644 index 00000000..a13c9358 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryQueryParamType.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; + +/** + * GetSearchLibraryQueryParamType - The type of media to retrieve. + * 1 = movie + * 2 = show + * 3 = season + * 4 = episode + * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + * + */ +public enum GetSearchLibraryQueryParamType { + Movie(1L), + TvShow(2L), + Season(3L), + Episode(4L); + + @JsonValue + private final long value; + + private GetSearchLibraryQueryParamType(long value) { + this.value = value; + } + + public long value() { + return value; + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryRequest.java index e16276dc..87b850bb 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryRequest.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryRequest.java @@ -35,12 +35,12 @@ public class GetSearchLibraryRequest { * */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=type") - private QueryParamType type; + private GetSearchLibraryQueryParamType type; @JsonCreator public GetSearchLibraryRequest( int sectionKey, - QueryParamType type) { + GetSearchLibraryQueryParamType type) { Utils.checkNotNull(sectionKey, "sectionKey"); Utils.checkNotNull(type, "type"); this.sectionKey = sectionKey; @@ -67,7 +67,7 @@ public class GetSearchLibraryRequest { * */ @JsonIgnore - public QueryParamType type() { + public GetSearchLibraryQueryParamType type() { return type; } @@ -95,7 +95,7 @@ public class GetSearchLibraryRequest { * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries * */ - public GetSearchLibraryRequest withType(QueryParamType type) { + public GetSearchLibraryRequest withType(GetSearchLibraryQueryParamType type) { Utils.checkNotNull(type, "type"); this.type = type; return this; @@ -133,7 +133,7 @@ public class GetSearchLibraryRequest { private Integer sectionKey; - private QueryParamType type; + private GetSearchLibraryQueryParamType type; private Builder() { // force use of static builder() method @@ -159,7 +159,7 @@ public class GetSearchLibraryRequest { * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries * */ - public Builder type(QueryParamType type) { + public Builder type(GetSearchLibraryQueryParamType type) { Utils.checkNotNull(type, "type"); this.type = type; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryRequestBuilder.java index 89b9c509..ed52545f 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryRequestBuilder.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetSearchLibraryRequestBuilder.java @@ -10,7 +10,7 @@ import java.lang.Integer; public class GetSearchLibraryRequestBuilder { private Integer sectionKey; - private QueryParamType type; + private GetSearchLibraryQueryParamType type; private final SDKMethodInterfaces.MethodCallGetSearchLibrary sdk; public GetSearchLibraryRequestBuilder(SDKMethodInterfaces.MethodCallGetSearchLibrary sdk) { @@ -23,7 +23,7 @@ public class GetSearchLibraryRequestBuilder { return this; } - public GetSearchLibraryRequestBuilder type(QueryParamType type) { + public GetSearchLibraryRequestBuilder type(GetSearchLibraryQueryParamType type) { Utils.checkNotNull(type, "type"); this.type = type; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/operations/LibrarySectionID.java b/src/main/java/dev/plexapi/sdk/models/operations/LibrarySectionID.java deleted file mode 100644 index bacb40bf..00000000 --- a/src/main/java/dev/plexapi/sdk/models/operations/LibrarySectionID.java +++ /dev/null @@ -1,98 +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 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.Long; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.Objects; - - -@JsonDeserialize(using = LibrarySectionID._Deserializer.class) -public class LibrarySectionID { - - @JsonValue - private TypedObject value; - - private LibrarySectionID(TypedObject value) { - this.value = value; - } - - public static LibrarySectionID of(long value) { - Utils.checkNotNull(value, "value"); - return new LibrarySectionID(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); - } - - public static LibrarySectionID of(String value) { - Utils.checkNotNull(value, "value"); - return new LibrarySectionID(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); - } - - /** - * Returns an instance of one of these types: - *
    - *
  • {@code long}
  • - *
  • {@code java.lang.String}
  • - *
- * - *

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; - } - LibrarySectionID other = (LibrarySectionID) 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(LibrarySectionID.class, false, - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); - } - } - - @Override - public String toString() { - return Utils.toString(LibrarySectionID.class, - "value", value); - } - -} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Media.java b/src/main/java/dev/plexapi/sdk/models/operations/Media.java index a6cc2cf9..f2f6b427 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/Media.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/Media.java @@ -10,9 +10,12 @@ 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.Integer; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; @@ -23,103 +26,101 @@ import java.util.Optional; public class Media { - @JsonInclude(Include.NON_ABSENT) @JsonProperty("id") - private Optional id; + private int id; - @JsonInclude(Include.NON_ABSENT) @JsonProperty("duration") - private Optional duration; + private int duration; - @JsonInclude(Include.NON_ABSENT) @JsonProperty("bitrate") - private Optional bitrate; + private int bitrate; - @JsonInclude(Include.NON_ABSENT) @JsonProperty("width") - private Optional width; + private int width; - @JsonInclude(Include.NON_ABSENT) @JsonProperty("height") - private Optional height; + private int height; - @JsonInclude(Include.NON_ABSENT) @JsonProperty("aspectRatio") - private Optional aspectRatio; + private double aspectRatio; @JsonInclude(Include.NON_ABSENT) + @JsonProperty("audioProfile") + private Optional audioProfile; + @JsonProperty("audioChannels") - private Optional audioChannels; + private int audioChannels; - @JsonInclude(Include.NON_ABSENT) @JsonProperty("audioCodec") - private Optional audioCodec; + private String audioCodec; - @JsonInclude(Include.NON_ABSENT) @JsonProperty("videoCodec") - private Optional videoCodec; + private String videoCodec; - @JsonInclude(Include.NON_ABSENT) @JsonProperty("videoResolution") - private Optional videoResolution; + private String videoResolution; - @JsonInclude(Include.NON_ABSENT) @JsonProperty("container") - private Optional container; + private String container; + + @JsonProperty("videoFrameRate") + private String videoFrameRate; + + @JsonProperty("videoProfile") + private String videoProfile; @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoFrameRate") - private Optional videoFrameRate; + @JsonProperty("hasVoiceActivity") + private Optional hasVoiceActivity; @JsonInclude(Include.NON_ABSENT) @JsonProperty("optimizedForStreaming") - private Optional optimizedForStreaming; + private Optional optimizedForStreaming; @JsonInclude(Include.NON_ABSENT) @JsonProperty("has64bitOffsets") private Optional has64bitOffsets; - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("videoProfile") - private Optional videoProfile; - - @JsonInclude(Include.NON_ABSENT) @JsonProperty("Part") - private Optional> part; + private List part; @JsonCreator public Media( - @JsonProperty("id") Optional id, - @JsonProperty("duration") Optional duration, - @JsonProperty("bitrate") Optional bitrate, - @JsonProperty("width") Optional width, - @JsonProperty("height") Optional height, - @JsonProperty("aspectRatio") Optional aspectRatio, - @JsonProperty("audioChannels") Optional audioChannels, - @JsonProperty("audioCodec") Optional audioCodec, - @JsonProperty("videoCodec") Optional videoCodec, - @JsonProperty("videoResolution") Optional videoResolution, - @JsonProperty("container") Optional container, - @JsonProperty("videoFrameRate") Optional videoFrameRate, - @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, + @JsonProperty("id") int id, + @JsonProperty("duration") int duration, + @JsonProperty("bitrate") int bitrate, + @JsonProperty("width") int width, + @JsonProperty("height") int height, + @JsonProperty("aspectRatio") double aspectRatio, + @JsonProperty("audioProfile") Optional audioProfile, + @JsonProperty("audioChannels") int audioChannels, + @JsonProperty("audioCodec") String audioCodec, + @JsonProperty("videoCodec") String videoCodec, + @JsonProperty("videoResolution") String videoResolution, + @JsonProperty("container") String container, + @JsonProperty("videoFrameRate") String videoFrameRate, + @JsonProperty("videoProfile") String videoProfile, + @JsonProperty("hasVoiceActivity") Optional hasVoiceActivity, + @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, @JsonProperty("has64bitOffsets") Optional has64bitOffsets, - @JsonProperty("videoProfile") Optional videoProfile, - @JsonProperty("Part") Optional> part) { + @JsonProperty("Part") List 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(audioCodec, "audioCodec"); Utils.checkNotNull(videoCodec, "videoCodec"); Utils.checkNotNull(videoResolution, "videoResolution"); Utils.checkNotNull(container, "container"); Utils.checkNotNull(videoFrameRate, "videoFrameRate"); + Utils.checkNotNull(videoProfile, "videoProfile"); + Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - Utils.checkNotNull(videoProfile, "videoProfile"); Utils.checkNotNull(part, "part"); this.id = id; this.duration = duration; @@ -127,85 +128,117 @@ public class Media { this.width = width; this.height = height; this.aspectRatio = aspectRatio; + this.audioProfile = audioProfile; this.audioChannels = audioChannels; this.audioCodec = audioCodec; this.videoCodec = videoCodec; this.videoResolution = videoResolution; this.container = container; this.videoFrameRate = videoFrameRate; + this.videoProfile = videoProfile; + this.hasVoiceActivity = hasVoiceActivity; this.optimizedForStreaming = optimizedForStreaming; this.has64bitOffsets = has64bitOffsets; - this.videoProfile = videoProfile; this.part = part; } - public Media() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + public Media( + int id, + int duration, + int bitrate, + int width, + int height, + double aspectRatio, + int audioChannels, + String audioCodec, + String videoCodec, + String videoResolution, + String container, + String videoFrameRate, + String videoProfile, + List part) { + this(id, duration, bitrate, width, height, aspectRatio, Optional.empty(), audioChannels, audioCodec, videoCodec, videoResolution, container, videoFrameRate, videoProfile, Optional.empty(), Optional.empty(), Optional.empty(), part); } @JsonIgnore - public Optional id() { + public int id() { return id; } @JsonIgnore - public Optional duration() { + public int duration() { return duration; } @JsonIgnore - public Optional bitrate() { + public int bitrate() { return bitrate; } @JsonIgnore - public Optional width() { + public int width() { return width; } @JsonIgnore - public Optional height() { + public int height() { return height; } @JsonIgnore - public Optional aspectRatio() { + public double aspectRatio() { return aspectRatio; } @JsonIgnore - public Optional audioChannels() { + public Optional audioProfile() { + return audioProfile; + } + + @JsonIgnore + public int audioChannels() { return audioChannels; } @JsonIgnore - public Optional audioCodec() { + public String audioCodec() { return audioCodec; } @JsonIgnore - public Optional videoCodec() { + public String videoCodec() { return videoCodec; } @JsonIgnore - public Optional videoResolution() { + public String videoResolution() { return videoResolution; } @JsonIgnore - public Optional container() { + public String container() { return container; } @JsonIgnore - public Optional videoFrameRate() { + public String videoFrameRate() { return videoFrameRate; } @JsonIgnore - public Optional optimizedForStreaming() { - return optimizedForStreaming; + public String videoProfile() { + return videoProfile; + } + + @JsonIgnore + public Optional hasVoiceActivity() { + return hasVoiceActivity; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional optimizedForStreaming() { + return (Optional) optimizedForStreaming; } @JsonIgnore @@ -214,171 +247,123 @@ public class Media { } @JsonIgnore - public Optional videoProfile() { - return videoProfile; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> part() { - return (Optional>) part; + public List part() { + return part; } public final static Builder builder() { return new Builder(); } - public Media withId(double id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - public Media withId(Optional id) { + public Media withId(int id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } - public Media withDuration(double duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - public Media withDuration(Optional duration) { + public Media withDuration(int duration) { Utils.checkNotNull(duration, "duration"); this.duration = duration; return this; } - public Media withBitrate(double bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = Optional.ofNullable(bitrate); - return this; - } - - public Media withBitrate(Optional bitrate) { + public Media withBitrate(int bitrate) { Utils.checkNotNull(bitrate, "bitrate"); this.bitrate = bitrate; return this; } - public Media withWidth(double width) { - Utils.checkNotNull(width, "width"); - this.width = Optional.ofNullable(width); - return this; - } - - public Media withWidth(Optional width) { + public Media withWidth(int width) { Utils.checkNotNull(width, "width"); this.width = width; return this; } - public Media withHeight(double height) { - Utils.checkNotNull(height, "height"); - this.height = Optional.ofNullable(height); - return this; - } - - public Media withHeight(Optional height) { + public Media withHeight(int height) { Utils.checkNotNull(height, "height"); this.height = height; return this; } public Media withAspectRatio(double aspectRatio) { - Utils.checkNotNull(aspectRatio, "aspectRatio"); - this.aspectRatio = Optional.ofNullable(aspectRatio); - return this; - } - - public Media withAspectRatio(Optional aspectRatio) { Utils.checkNotNull(aspectRatio, "aspectRatio"); this.aspectRatio = aspectRatio; return this; } - public Media withAudioChannels(double audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = Optional.ofNullable(audioChannels); + public Media withAudioProfile(String audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = Optional.ofNullable(audioProfile); return this; } - public Media withAudioChannels(Optional audioChannels) { + public Media withAudioProfile(Optional audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = audioProfile; + return this; + } + + public Media withAudioChannels(int audioChannels) { Utils.checkNotNull(audioChannels, "audioChannels"); this.audioChannels = audioChannels; return this; } public Media withAudioCodec(String audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = Optional.ofNullable(audioCodec); - return this; - } - - public Media withAudioCodec(Optional audioCodec) { Utils.checkNotNull(audioCodec, "audioCodec"); this.audioCodec = audioCodec; return this; } public Media withVideoCodec(String videoCodec) { - Utils.checkNotNull(videoCodec, "videoCodec"); - this.videoCodec = Optional.ofNullable(videoCodec); - return this; - } - - public Media withVideoCodec(Optional videoCodec) { Utils.checkNotNull(videoCodec, "videoCodec"); this.videoCodec = videoCodec; return this; } - public Media withVideoResolution(double videoResolution) { - Utils.checkNotNull(videoResolution, "videoResolution"); - this.videoResolution = Optional.ofNullable(videoResolution); - return this; - } - - public Media withVideoResolution(Optional videoResolution) { + public Media withVideoResolution(String videoResolution) { Utils.checkNotNull(videoResolution, "videoResolution"); this.videoResolution = videoResolution; return this; } public Media withContainer(String container) { - Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); - return this; - } - - public Media withContainer(Optional container) { Utils.checkNotNull(container, "container"); this.container = container; return this; } public Media withVideoFrameRate(String videoFrameRate) { - Utils.checkNotNull(videoFrameRate, "videoFrameRate"); - this.videoFrameRate = Optional.ofNullable(videoFrameRate); - return this; - } - - public Media withVideoFrameRate(Optional videoFrameRate) { Utils.checkNotNull(videoFrameRate, "videoFrameRate"); this.videoFrameRate = videoFrameRate; return this; } - public Media withOptimizedForStreaming(double optimizedForStreaming) { + public Media withVideoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + public Media withHasVoiceActivity(boolean hasVoiceActivity) { + Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); + this.hasVoiceActivity = Optional.ofNullable(hasVoiceActivity); + return this; + } + + public Media withHasVoiceActivity(Optional hasVoiceActivity) { + Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); + this.hasVoiceActivity = hasVoiceActivity; + return this; + } + + public Media withOptimizedForStreaming(OptimizedForStreaming optimizedForStreaming) { Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); return this; } - public Media withOptimizedForStreaming(Optional optimizedForStreaming) { + public Media withOptimizedForStreaming(Optional optimizedForStreaming) { Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); this.optimizedForStreaming = optimizedForStreaming; return this; @@ -396,25 +381,7 @@ public class Media { return this; } - public Media withVideoProfile(String videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); - return this; - } - - public Media withVideoProfile(Optional videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = videoProfile; - return this; - } - public Media withPart(List part) { - Utils.checkNotNull(part, "part"); - this.part = Optional.ofNullable(part); - return this; - } - - public Media withPart(Optional> part) { Utils.checkNotNull(part, "part"); this.part = part; return this; @@ -436,15 +403,17 @@ public class Media { 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.audioCodec, other.audioCodec) && Objects.deepEquals(this.videoCodec, other.videoCodec) && Objects.deepEquals(this.videoResolution, other.videoResolution) && Objects.deepEquals(this.container, other.container) && Objects.deepEquals(this.videoFrameRate, other.videoFrameRate) && + Objects.deepEquals(this.videoProfile, other.videoProfile) && + Objects.deepEquals(this.hasVoiceActivity, other.hasVoiceActivity) && Objects.deepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && Objects.deepEquals(this.has64bitOffsets, other.has64bitOffsets) && - Objects.deepEquals(this.videoProfile, other.videoProfile) && Objects.deepEquals(this.part, other.part); } @@ -457,15 +426,17 @@ public class Media { width, height, aspectRatio, + audioProfile, audioChannels, audioCodec, videoCodec, videoResolution, container, videoFrameRate, + videoProfile, + hasVoiceActivity, optimizedForStreaming, has64bitOffsets, - videoProfile, part); } @@ -478,207 +449,171 @@ public class Media { "width", width, "height", height, "aspectRatio", aspectRatio, + "audioProfile", audioProfile, "audioChannels", audioChannels, "audioCodec", audioCodec, "videoCodec", videoCodec, "videoResolution", videoResolution, "container", container, "videoFrameRate", videoFrameRate, + "videoProfile", videoProfile, + "hasVoiceActivity", hasVoiceActivity, "optimizedForStreaming", optimizedForStreaming, "has64bitOffsets", has64bitOffsets, - "videoProfile", videoProfile, "part", part); } public final static class Builder { - private Optional id = Optional.empty(); + private Integer id; - private Optional duration = Optional.empty(); + private Integer duration; - private Optional bitrate = Optional.empty(); + private Integer bitrate; - private Optional width = Optional.empty(); + private Integer width; - private Optional height = Optional.empty(); + private Integer height; - private Optional aspectRatio = Optional.empty(); + private Double aspectRatio; - private Optional audioChannels = Optional.empty(); + private Optional audioProfile = Optional.empty(); - private Optional audioCodec = Optional.empty(); + private Integer audioChannels; - private Optional videoCodec = Optional.empty(); + private String audioCodec; - private Optional videoResolution = Optional.empty(); + private String videoCodec; - private Optional container = Optional.empty(); + private String videoResolution; - private Optional videoFrameRate = Optional.empty(); + private String container; - private Optional optimizedForStreaming = Optional.empty(); + private String videoFrameRate; + + private String videoProfile; + + private Optional hasVoiceActivity = Optional.empty(); + + private Optional optimizedForStreaming; private Optional has64bitOffsets = Optional.empty(); - private Optional videoProfile = Optional.empty(); - - private Optional> part = Optional.empty(); + private List part; private Builder() { // force use of static builder() method } - public Builder id(double id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - public Builder id(Optional id) { + public Builder id(int id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } - public Builder duration(double duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - public Builder duration(Optional duration) { + public Builder duration(int duration) { Utils.checkNotNull(duration, "duration"); this.duration = duration; return this; } - public Builder bitrate(double bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = Optional.ofNullable(bitrate); - return this; - } - - public Builder bitrate(Optional bitrate) { + public Builder bitrate(int bitrate) { Utils.checkNotNull(bitrate, "bitrate"); this.bitrate = bitrate; return this; } - public Builder width(double width) { - Utils.checkNotNull(width, "width"); - this.width = Optional.ofNullable(width); - return this; - } - - public Builder width(Optional width) { + public Builder width(int width) { Utils.checkNotNull(width, "width"); this.width = width; return this; } - public Builder height(double height) { - Utils.checkNotNull(height, "height"); - this.height = Optional.ofNullable(height); - return this; - } - - public Builder height(Optional height) { + public Builder height(int height) { Utils.checkNotNull(height, "height"); this.height = height; return this; } public Builder aspectRatio(double aspectRatio) { - Utils.checkNotNull(aspectRatio, "aspectRatio"); - this.aspectRatio = Optional.ofNullable(aspectRatio); - return this; - } - - public Builder aspectRatio(Optional aspectRatio) { Utils.checkNotNull(aspectRatio, "aspectRatio"); this.aspectRatio = aspectRatio; return this; } - public Builder audioChannels(double audioChannels) { - Utils.checkNotNull(audioChannels, "audioChannels"); - this.audioChannels = Optional.ofNullable(audioChannels); + public Builder audioProfile(String audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = Optional.ofNullable(audioProfile); return this; } - public Builder audioChannels(Optional audioChannels) { + public Builder audioProfile(Optional audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = audioProfile; + return this; + } + + public Builder audioChannels(int audioChannels) { Utils.checkNotNull(audioChannels, "audioChannels"); this.audioChannels = audioChannels; return this; } public Builder audioCodec(String audioCodec) { - Utils.checkNotNull(audioCodec, "audioCodec"); - this.audioCodec = Optional.ofNullable(audioCodec); - return this; - } - - public Builder audioCodec(Optional audioCodec) { Utils.checkNotNull(audioCodec, "audioCodec"); this.audioCodec = audioCodec; return this; } public Builder videoCodec(String videoCodec) { - Utils.checkNotNull(videoCodec, "videoCodec"); - this.videoCodec = Optional.ofNullable(videoCodec); - return this; - } - - public Builder videoCodec(Optional videoCodec) { Utils.checkNotNull(videoCodec, "videoCodec"); this.videoCodec = videoCodec; return this; } - public Builder videoResolution(double videoResolution) { - Utils.checkNotNull(videoResolution, "videoResolution"); - this.videoResolution = Optional.ofNullable(videoResolution); - return this; - } - - public Builder videoResolution(Optional videoResolution) { + public Builder videoResolution(String videoResolution) { Utils.checkNotNull(videoResolution, "videoResolution"); this.videoResolution = videoResolution; return this; } public Builder container(String container) { - Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); - return this; - } - - public Builder container(Optional container) { Utils.checkNotNull(container, "container"); this.container = container; return this; } public Builder videoFrameRate(String videoFrameRate) { - Utils.checkNotNull(videoFrameRate, "videoFrameRate"); - this.videoFrameRate = Optional.ofNullable(videoFrameRate); - return this; - } - - public Builder videoFrameRate(Optional videoFrameRate) { Utils.checkNotNull(videoFrameRate, "videoFrameRate"); this.videoFrameRate = videoFrameRate; return this; } - public Builder optimizedForStreaming(double optimizedForStreaming) { + public Builder videoProfile(String videoProfile) { + Utils.checkNotNull(videoProfile, "videoProfile"); + this.videoProfile = videoProfile; + return this; + } + + public Builder hasVoiceActivity(boolean hasVoiceActivity) { + Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); + this.hasVoiceActivity = Optional.ofNullable(hasVoiceActivity); + return this; + } + + public Builder hasVoiceActivity(Optional hasVoiceActivity) { + Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); + this.hasVoiceActivity = hasVoiceActivity; + return this; + } + + public Builder optimizedForStreaming(OptimizedForStreaming optimizedForStreaming) { Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); return this; } - public Builder optimizedForStreaming(Optional optimizedForStreaming) { + public Builder optimizedForStreaming(Optional optimizedForStreaming) { Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); this.optimizedForStreaming = optimizedForStreaming; return this; @@ -696,49 +631,41 @@ public class Media { 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 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 Media build() { - return new Media( + if (optimizedForStreaming == null) { + optimizedForStreaming = _SINGLETON_VALUE_OptimizedForStreaming.value(); + } return new Media( id, duration, bitrate, width, height, aspectRatio, + audioProfile, audioChannels, audioCodec, videoCodec, videoResolution, container, videoFrameRate, + videoProfile, + hasVoiceActivity, optimizedForStreaming, has64bitOffsets, - videoProfile, 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/Meta.java b/src/main/java/dev/plexapi/sdk/models/operations/Meta.java index dd550515..c4b0e855 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/Meta.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/Meta.java @@ -27,16 +27,16 @@ public class Meta { @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 Meta( - @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; @@ -49,39 +49,39 @@ public class Meta { @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 Meta withType(List type) { + public Meta withType(List type) { Utils.checkNotNull(type, "type"); this.type = Optional.ofNullable(type); return this; } - public Meta withType(Optional> type) { + public Meta withType(Optional> type) { Utils.checkNotNull(type, "type"); this.type = type; return this; } - public Meta withFieldType(List fieldType) { + public Meta withFieldType(List fieldType) { Utils.checkNotNull(fieldType, "fieldType"); this.fieldType = Optional.ofNullable(fieldType); return this; } - public Meta withFieldType(Optional> fieldType) { + public Meta withFieldType(Optional> fieldType) { Utils.checkNotNull(fieldType, "fieldType"); this.fieldType = fieldType; return this; @@ -117,33 +117,33 @@ public class Meta { 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/MetaDataRating.java b/src/main/java/dev/plexapi/sdk/models/operations/MetaDataRating.java new file mode 100644 index 00000000..faae41c8 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/MetaDataRating.java @@ -0,0 +1,184 @@ +/* + * 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 MetaDataRating { + + /** + * 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 MetaDataRating( + @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 MetaDataRating withImage(String image) { + Utils.checkNotNull(image, "image"); + this.image = image; + return this; + } + + /** + * The value of the rating. + */ + public MetaDataRating withValue(float value) { + Utils.checkNotNull(value, "value"); + this.value = value; + return this; + } + + /** + * The type of rating (e.g., audience, critic). + */ + public MetaDataRating 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; + } + MetaDataRating other = (MetaDataRating) 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(MetaDataRating.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 MetaDataRating build() { + return new MetaDataRating( + image, + value, + type); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Operator.java b/src/main/java/dev/plexapi/sdk/models/operations/Operator.java index 56586b93..a7cc2466 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/Operator.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/Operator.java @@ -7,47 +7,38 @@ 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 Operator { - @JsonInclude(Include.NON_ABSENT) @JsonProperty("key") - private Optional key; + private String key; - @JsonInclude(Include.NON_ABSENT) @JsonProperty("title") - private Optional title; + private String title; @JsonCreator public Operator( - @JsonProperty("key") Optional key, - @JsonProperty("title") Optional title) { + @JsonProperty("key") String key, + @JsonProperty("title") String title) { Utils.checkNotNull(key, "key"); Utils.checkNotNull(title, "title"); this.key = key; this.title = title; } - - public Operator() { - this(Optional.empty(), Optional.empty()); - } @JsonIgnore - public Optional key() { + public String key() { return key; } @JsonIgnore - public Optional title() { + public String title() { return title; } @@ -56,24 +47,12 @@ public class Operator { } public Operator withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - public Operator withKey(Optional key) { Utils.checkNotNull(key, "key"); this.key = key; return this; } public Operator withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - public Operator withTitle(Optional title) { Utils.checkNotNull(title, "title"); this.title = title; return this; @@ -109,33 +88,21 @@ public class Operator { public final static class Builder { - private Optional key = Optional.empty(); + private String key; - private Optional title = Optional.empty(); + private String title; private Builder() { // force use of static builder() method } public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - public Builder key(Optional key) { Utils.checkNotNull(key, "key"); this.key = key; return this; } public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - public Builder title(Optional title) { Utils.checkNotNull(title, "title"); this.title = title; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/operations/OptimizedForStreaming.java b/src/main/java/dev/plexapi/sdk/models/operations/OptimizedForStreaming.java new file mode 100644 index 00000000..f5cd9179 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/OptimizedForStreaming.java @@ -0,0 +1,23 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; + +public enum OptimizedForStreaming { + Disable(0), + Enable(1); + + @JsonValue + private final int value; + + private OptimizedForStreaming(int value) { + this.value = value; + } + + public int value() { + return value; + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Part.java b/src/main/java/dev/plexapi/sdk/models/operations/Part.java index 38e5f9a0..648fce8f 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/Part.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/Part.java @@ -10,218 +10,249 @@ 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.Integer; +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 Part { - @JsonInclude(Include.NON_ABSENT) @JsonProperty("id") - private Optional id; + private int id; - @JsonInclude(Include.NON_ABSENT) @JsonProperty("key") - private Optional key; + private String key; - @JsonInclude(Include.NON_ABSENT) @JsonProperty("duration") - private Optional duration; + private int duration; - @JsonInclude(Include.NON_ABSENT) @JsonProperty("file") - private Optional file; + private String file; - @JsonInclude(Include.NON_ABSENT) @JsonProperty("size") - private Optional size; + private long size; + + /** + * The container format of the media file. + * + */ + @JsonProperty("container") + private String container; @JsonInclude(Include.NON_ABSENT) - @JsonProperty("container") - private Optional container; + @JsonProperty("audioProfile") + private Optional audioProfile; @JsonInclude(Include.NON_ABSENT) @JsonProperty("has64bitOffsets") private Optional has64bitOffsets; - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("hasThumbnail") - private Optional hasThumbnail; - @JsonInclude(Include.NON_ABSENT) @JsonProperty("optimizedForStreaming") private Optional optimizedForStreaming; - @JsonInclude(Include.NON_ABSENT) @JsonProperty("videoProfile") - private Optional videoProfile; + private String videoProfile; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("indexes") + private Optional indexes; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hasThumbnail") + private Optional hasThumbnail; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("Stream") + private Optional> stream; @JsonCreator public Part( - @JsonProperty("id") Optional id, - @JsonProperty("key") Optional key, - @JsonProperty("duration") Optional duration, - @JsonProperty("file") Optional file, - @JsonProperty("size") Optional size, - @JsonProperty("container") Optional container, + @JsonProperty("id") int id, + @JsonProperty("key") String key, + @JsonProperty("duration") int duration, + @JsonProperty("file") String file, + @JsonProperty("size") long size, + @JsonProperty("container") String container, + @JsonProperty("audioProfile") Optional audioProfile, @JsonProperty("has64bitOffsets") Optional has64bitOffsets, - @JsonProperty("hasThumbnail") Optional hasThumbnail, @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, - @JsonProperty("videoProfile") Optional videoProfile) { + @JsonProperty("videoProfile") String videoProfile, + @JsonProperty("indexes") Optional indexes, + @JsonProperty("hasThumbnail") Optional hasThumbnail, + @JsonProperty("Stream") Optional> stream) { Utils.checkNotNull(id, "id"); Utils.checkNotNull(key, "key"); Utils.checkNotNull(duration, "duration"); Utils.checkNotNull(file, "file"); Utils.checkNotNull(size, "size"); Utils.checkNotNull(container, "container"); + Utils.checkNotNull(audioProfile, "audioProfile"); Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); - Utils.checkNotNull(hasThumbnail, "hasThumbnail"); Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); Utils.checkNotNull(videoProfile, "videoProfile"); + Utils.checkNotNull(indexes, "indexes"); + Utils.checkNotNull(hasThumbnail, "hasThumbnail"); + Utils.checkNotNull(stream, "stream"); this.id = id; this.key = key; this.duration = duration; this.file = file; this.size = size; this.container = container; + this.audioProfile = audioProfile; this.has64bitOffsets = has64bitOffsets; - this.hasThumbnail = hasThumbnail; this.optimizedForStreaming = optimizedForStreaming; this.videoProfile = videoProfile; + this.indexes = indexes; + this.hasThumbnail = hasThumbnail; + this.stream = stream; } - public Part() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + public Part( + int id, + String key, + int duration, + String file, + long size, + String container, + String videoProfile) { + this(id, key, duration, file, size, container, Optional.empty(), Optional.empty(), Optional.empty(), videoProfile, Optional.empty(), Optional.empty(), Optional.empty()); } @JsonIgnore - public Optional id() { + public int id() { return id; } @JsonIgnore - public Optional key() { + public String key() { return key; } @JsonIgnore - public Optional duration() { + public int duration() { return duration; } @JsonIgnore - public Optional file() { + public String file() { return file; } @JsonIgnore - public Optional size() { + public long size() { return size; } + /** + * The container format of the media file. + * + */ @JsonIgnore - public Optional container() { + public String container() { return container; } + @JsonIgnore + public Optional audioProfile() { + return audioProfile; + } + @JsonIgnore public Optional has64bitOffsets() { return has64bitOffsets; } - @JsonIgnore - public Optional hasThumbnail() { - return hasThumbnail; - } - @JsonIgnore public Optional optimizedForStreaming() { return optimizedForStreaming; } @JsonIgnore - public Optional videoProfile() { + public String videoProfile() { return videoProfile; } + @JsonIgnore + public Optional indexes() { + return indexes; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional hasThumbnail() { + return (Optional) hasThumbnail; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> stream() { + return (Optional>) stream; + } + public final static Builder builder() { return new Builder(); } - public Part withId(double id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - public Part withId(Optional id) { + public Part withId(int id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } public Part withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - public Part withKey(Optional key) { Utils.checkNotNull(key, "key"); this.key = key; return this; } - public Part withDuration(double duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - public Part withDuration(Optional duration) { + public Part withDuration(int duration) { Utils.checkNotNull(duration, "duration"); this.duration = duration; return this; } public Part withFile(String file) { - Utils.checkNotNull(file, "file"); - this.file = Optional.ofNullable(file); - return this; - } - - public Part withFile(Optional file) { Utils.checkNotNull(file, "file"); this.file = file; return this; } - public Part withSize(double size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - public Part withSize(Optional size) { + public Part withSize(long size) { Utils.checkNotNull(size, "size"); this.size = size; return this; } + /** + * The container format of the media file. + * + */ public Part withContainer(String container) { Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); + this.container = container; return this; } - public Part withContainer(Optional container) { - Utils.checkNotNull(container, "container"); - this.container = container; + public Part withAudioProfile(String audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = Optional.ofNullable(audioProfile); + return this; + } + + public Part withAudioProfile(Optional audioProfile) { + Utils.checkNotNull(audioProfile, "audioProfile"); + this.audioProfile = audioProfile; return this; } @@ -237,18 +268,6 @@ public class Part { return this; } - public Part withHasThumbnail(double hasThumbnail) { - Utils.checkNotNull(hasThumbnail, "hasThumbnail"); - this.hasThumbnail = Optional.ofNullable(hasThumbnail); - return this; - } - - public Part withHasThumbnail(Optional hasThumbnail) { - Utils.checkNotNull(hasThumbnail, "hasThumbnail"); - this.hasThumbnail = hasThumbnail; - return this; - } - public Part withOptimizedForStreaming(boolean optimizedForStreaming) { Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); @@ -263,13 +282,43 @@ public class Part { public Part withVideoProfile(String videoProfile) { Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); + this.videoProfile = videoProfile; return this; } - public Part withVideoProfile(Optional videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = videoProfile; + public Part withIndexes(String indexes) { + Utils.checkNotNull(indexes, "indexes"); + this.indexes = Optional.ofNullable(indexes); + return this; + } + + public Part withIndexes(Optional indexes) { + Utils.checkNotNull(indexes, "indexes"); + this.indexes = indexes; + return this; + } + + public Part withHasThumbnail(HasThumbnail hasThumbnail) { + Utils.checkNotNull(hasThumbnail, "hasThumbnail"); + this.hasThumbnail = Optional.ofNullable(hasThumbnail); + return this; + } + + public Part withHasThumbnail(Optional hasThumbnail) { + Utils.checkNotNull(hasThumbnail, "hasThumbnail"); + this.hasThumbnail = hasThumbnail; + return this; + } + + public Part withStream(List stream) { + Utils.checkNotNull(stream, "stream"); + this.stream = Optional.ofNullable(stream); + return this; + } + + public Part withStream(Optional> stream) { + Utils.checkNotNull(stream, "stream"); + this.stream = stream; return this; } @@ -289,10 +338,13 @@ public class Part { Objects.deepEquals(this.file, other.file) && Objects.deepEquals(this.size, other.size) && Objects.deepEquals(this.container, other.container) && + Objects.deepEquals(this.audioProfile, other.audioProfile) && Objects.deepEquals(this.has64bitOffsets, other.has64bitOffsets) && - Objects.deepEquals(this.hasThumbnail, other.hasThumbnail) && Objects.deepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && - Objects.deepEquals(this.videoProfile, other.videoProfile); + Objects.deepEquals(this.videoProfile, other.videoProfile) && + Objects.deepEquals(this.indexes, other.indexes) && + Objects.deepEquals(this.hasThumbnail, other.hasThumbnail) && + Objects.deepEquals(this.stream, other.stream); } @Override @@ -304,10 +356,13 @@ public class Part { file, size, container, + audioProfile, has64bitOffsets, - hasThumbnail, optimizedForStreaming, - videoProfile); + videoProfile, + indexes, + hasThumbnail, + stream); } @Override @@ -319,107 +374,96 @@ public class Part { "file", file, "size", size, "container", container, + "audioProfile", audioProfile, "has64bitOffsets", has64bitOffsets, - "hasThumbnail", hasThumbnail, "optimizedForStreaming", optimizedForStreaming, - "videoProfile", videoProfile); + "videoProfile", videoProfile, + "indexes", indexes, + "hasThumbnail", hasThumbnail, + "stream", stream); } public final static class Builder { - private Optional id = Optional.empty(); + private Integer id; - private Optional key = Optional.empty(); + private String key; - private Optional duration = Optional.empty(); + private Integer duration; - private Optional file = Optional.empty(); + private String file; - private Optional size = Optional.empty(); + private Long size; - private Optional container = Optional.empty(); + private String container; + + private Optional audioProfile = Optional.empty(); private Optional has64bitOffsets = Optional.empty(); - private Optional hasThumbnail = Optional.empty(); - private Optional optimizedForStreaming = Optional.empty(); - private Optional videoProfile = Optional.empty(); + private String videoProfile; + + private Optional indexes = Optional.empty(); + + private Optional hasThumbnail; + + private Optional> stream = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder id(double id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - public Builder id(Optional id) { + public Builder id(int id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - public Builder key(Optional key) { Utils.checkNotNull(key, "key"); this.key = key; return this; } - public Builder duration(double duration) { - Utils.checkNotNull(duration, "duration"); - this.duration = Optional.ofNullable(duration); - return this; - } - - public Builder duration(Optional duration) { + public Builder duration(int duration) { Utils.checkNotNull(duration, "duration"); this.duration = duration; return this; } public Builder file(String file) { - Utils.checkNotNull(file, "file"); - this.file = Optional.ofNullable(file); - return this; - } - - public Builder file(Optional file) { Utils.checkNotNull(file, "file"); this.file = file; return this; } - public Builder size(double size) { - Utils.checkNotNull(size, "size"); - this.size = Optional.ofNullable(size); - return this; - } - - public Builder size(Optional size) { + public Builder size(long size) { Utils.checkNotNull(size, "size"); this.size = size; return this; } + /** + * The container format of the media file. + * + */ public Builder container(String container) { Utils.checkNotNull(container, "container"); - this.container = Optional.ofNullable(container); + this.container = container; return this; } - public Builder container(Optional container) { - Utils.checkNotNull(container, "container"); - this.container = container; + 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; } @@ -435,18 +479,6 @@ public class Part { return this; } - public Builder hasThumbnail(double hasThumbnail) { - Utils.checkNotNull(hasThumbnail, "hasThumbnail"); - this.hasThumbnail = Optional.ofNullable(hasThumbnail); - return this; - } - - public Builder hasThumbnail(Optional hasThumbnail) { - Utils.checkNotNull(hasThumbnail, "hasThumbnail"); - this.hasThumbnail = hasThumbnail; - return this; - } - public Builder optimizedForStreaming(boolean optimizedForStreaming) { Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); @@ -461,29 +493,70 @@ public class Part { public Builder videoProfile(String videoProfile) { Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = Optional.ofNullable(videoProfile); + this.videoProfile = videoProfile; return this; } - public Builder videoProfile(Optional videoProfile) { - Utils.checkNotNull(videoProfile, "videoProfile"); - this.videoProfile = videoProfile; + 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(HasThumbnail hasThumbnail) { + Utils.checkNotNull(hasThumbnail, "hasThumbnail"); + this.hasThumbnail = Optional.ofNullable(hasThumbnail); + return this; + } + + public Builder hasThumbnail(Optional hasThumbnail) { + Utils.checkNotNull(hasThumbnail, "hasThumbnail"); + 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 Part build() { - return new Part( + if (hasThumbnail == null) { + hasThumbnail = _SINGLETON_VALUE_HasThumbnail.value(); + } return new Part( id, key, duration, file, size, container, + audioProfile, has64bitOffsets, - hasThumbnail, optimizedForStreaming, - videoProfile); + videoProfile, + indexes, + hasThumbnail, + stream); } + + private static final LazySingletonValue> _SINGLETON_VALUE_HasThumbnail = + new LazySingletonValue<>( + "hasThumbnail", + "\"0\"", + new TypeReference>() {}); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequest.java new file mode 100644 index 00000000..66edb8d5 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequest.java @@ -0,0 +1,367 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.plexapi.sdk.utils.SpeakeasyMetadata; +import dev.plexapi.sdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Objects; +import java.util.Optional; + + +public class PostUsersSignInDataRequest { + + /** + * The unique identifier for the client application + * This is used to track the client application and its usage + * (UUID, serial number, or other number unique per device) + * + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier") + private Optional clientID; + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Product") + private Optional clientName; + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Device") + private Optional deviceName; + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Version") + private Optional clientVersion; + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Platform") + private Optional clientPlatform; + + /** + * Login credentials + */ + @SpeakeasyMetadata("request:mediaType=application/x-www-form-urlencoded") + private Optional requestBody; + + @JsonCreator + public PostUsersSignInDataRequest( + Optional clientID, + Optional clientName, + Optional deviceName, + Optional clientVersion, + Optional clientPlatform, + Optional requestBody) { + Utils.checkNotNull(clientID, "clientID"); + Utils.checkNotNull(clientName, "clientName"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(clientVersion, "clientVersion"); + Utils.checkNotNull(clientPlatform, "clientPlatform"); + Utils.checkNotNull(requestBody, "requestBody"); + this.clientID = clientID; + this.clientName = clientName; + this.deviceName = deviceName; + this.clientVersion = clientVersion; + this.clientPlatform = clientPlatform; + this.requestBody = requestBody; + } + + public PostUsersSignInDataRequest() { + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * The unique identifier for the client application + * This is used to track the client application and its usage + * (UUID, serial number, or other number unique per device) + * + */ + @JsonIgnore + public Optional clientID() { + return clientID; + } + + @JsonIgnore + public Optional clientName() { + return clientName; + } + + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + @JsonIgnore + public Optional clientVersion() { + return clientVersion; + } + + @JsonIgnore + public Optional clientPlatform() { + return clientPlatform; + } + + /** + * Login credentials + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional requestBody() { + return (Optional) requestBody; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The unique identifier for the client application + * This is used to track the client application and its usage + * (UUID, serial number, or other number unique per device) + * + */ + public PostUsersSignInDataRequest withClientID(String clientID) { + Utils.checkNotNull(clientID, "clientID"); + this.clientID = Optional.ofNullable(clientID); + return this; + } + + /** + * The unique identifier for the client application + * This is used to track the client application and its usage + * (UUID, serial number, or other number unique per device) + * + */ + public PostUsersSignInDataRequest withClientID(Optional clientID) { + Utils.checkNotNull(clientID, "clientID"); + this.clientID = clientID; + return this; + } + + public PostUsersSignInDataRequest withClientName(String clientName) { + Utils.checkNotNull(clientName, "clientName"); + this.clientName = Optional.ofNullable(clientName); + return this; + } + + public PostUsersSignInDataRequest withClientName(Optional clientName) { + Utils.checkNotNull(clientName, "clientName"); + this.clientName = clientName; + return this; + } + + public PostUsersSignInDataRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + public PostUsersSignInDataRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + public PostUsersSignInDataRequest withClientVersion(String clientVersion) { + Utils.checkNotNull(clientVersion, "clientVersion"); + this.clientVersion = Optional.ofNullable(clientVersion); + return this; + } + + public PostUsersSignInDataRequest withClientVersion(Optional clientVersion) { + Utils.checkNotNull(clientVersion, "clientVersion"); + this.clientVersion = clientVersion; + return this; + } + + public PostUsersSignInDataRequest withClientPlatform(String clientPlatform) { + Utils.checkNotNull(clientPlatform, "clientPlatform"); + this.clientPlatform = Optional.ofNullable(clientPlatform); + return this; + } + + public PostUsersSignInDataRequest withClientPlatform(Optional clientPlatform) { + Utils.checkNotNull(clientPlatform, "clientPlatform"); + this.clientPlatform = clientPlatform; + return this; + } + + /** + * Login credentials + */ + public PostUsersSignInDataRequest withRequestBody(PostUsersSignInDataRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + /** + * Login credentials + */ + public PostUsersSignInDataRequest withRequestBody(Optional requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostUsersSignInDataRequest other = (PostUsersSignInDataRequest) o; + return + Objects.deepEquals(this.clientID, other.clientID) && + Objects.deepEquals(this.clientName, other.clientName) && + Objects.deepEquals(this.deviceName, other.deviceName) && + Objects.deepEquals(this.clientVersion, other.clientVersion) && + Objects.deepEquals(this.clientPlatform, other.clientPlatform) && + Objects.deepEquals(this.requestBody, other.requestBody); + } + + @Override + public int hashCode() { + return Objects.hash( + clientID, + clientName, + deviceName, + clientVersion, + clientPlatform, + requestBody); + } + + @Override + public String toString() { + return Utils.toString(PostUsersSignInDataRequest.class, + "clientID", clientID, + "clientName", clientName, + "deviceName", deviceName, + "clientVersion", clientVersion, + "clientPlatform", clientPlatform, + "requestBody", requestBody); + } + + public final static class Builder { + + private Optional clientID = Optional.empty(); + + private Optional clientName = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional clientVersion = Optional.empty(); + + private Optional clientPlatform = Optional.empty(); + + private Optional requestBody = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * The unique identifier for the client application + * This is used to track the client application and its usage + * (UUID, serial number, or other number unique per device) + * + */ + public Builder clientID(String clientID) { + Utils.checkNotNull(clientID, "clientID"); + this.clientID = Optional.ofNullable(clientID); + return this; + } + + /** + * The unique identifier for the client application + * This is used to track the client application and its usage + * (UUID, serial number, or other number unique per device) + * + */ + public Builder clientID(Optional clientID) { + Utils.checkNotNull(clientID, "clientID"); + this.clientID = clientID; + return this; + } + + public Builder clientName(String clientName) { + Utils.checkNotNull(clientName, "clientName"); + this.clientName = Optional.ofNullable(clientName); + return this; + } + + public Builder clientName(Optional clientName) { + Utils.checkNotNull(clientName, "clientName"); + this.clientName = clientName; + return this; + } + + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + public Builder clientVersion(String clientVersion) { + Utils.checkNotNull(clientVersion, "clientVersion"); + this.clientVersion = Optional.ofNullable(clientVersion); + return this; + } + + public Builder clientVersion(Optional clientVersion) { + Utils.checkNotNull(clientVersion, "clientVersion"); + this.clientVersion = clientVersion; + return this; + } + + public Builder clientPlatform(String clientPlatform) { + Utils.checkNotNull(clientPlatform, "clientPlatform"); + this.clientPlatform = Optional.ofNullable(clientPlatform); + return this; + } + + public Builder clientPlatform(Optional clientPlatform) { + Utils.checkNotNull(clientPlatform, "clientPlatform"); + this.clientPlatform = clientPlatform; + return this; + } + + /** + * Login credentials + */ + public Builder requestBody(PostUsersSignInDataRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + /** + * Login credentials + */ + public Builder requestBody(Optional requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + public PostUsersSignInDataRequest build() { + return new PostUsersSignInDataRequest( + clientID, + clientName, + deviceName, + clientVersion, + clientPlatform, + requestBody); + } + } +} + diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequestBuilder.java index 161d5c21..3021fda5 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequestBuilder.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequestBuilder.java @@ -10,21 +10,15 @@ import java.util.Optional; public class PostUsersSignInDataRequestBuilder { - private Optional request = Optional.empty(); + private PostUsersSignInDataRequest request; private Optional serverURL = Optional.empty(); private final SDKMethodInterfaces.MethodCallPostUsersSignInData sdk; public PostUsersSignInDataRequestBuilder(SDKMethodInterfaces.MethodCallPostUsersSignInData sdk) { this.sdk = sdk; } - - public PostUsersSignInDataRequestBuilder request(PostUsersSignInDataRequestBody request) { - Utils.checkNotNull(request, "request"); - this.request = Optional.of(request); - return this; - } - public PostUsersSignInDataRequestBuilder request(Optional request) { + public PostUsersSignInDataRequestBuilder request(PostUsersSignInDataRequest request) { Utils.checkNotNull(request, "request"); this.request = request; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/operations/QueryParamIncludeMeta.java b/src/main/java/dev/plexapi/sdk/models/operations/QueryParamIncludeMeta.java new file mode 100644 index 00000000..51f62c97 --- /dev/null +++ b/src/main/java/dev/plexapi/sdk/models/operations/QueryParamIncludeMeta.java @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.plexapi.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * QueryParamIncludeMeta - Adds the Meta object to the response + * + */ +public enum QueryParamIncludeMeta { + Disable(0), + Enable(1); + + @JsonValue + private final int value; + + private QueryParamIncludeMeta(int value) { + this.value = value; + } + + public int value() { + return value; + } +} diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Role.java b/src/main/java/dev/plexapi/sdk/models/operations/Role.java index 45a55b95..c9a12dd4 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/Role.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/Role.java @@ -11,6 +11,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.Override; import java.lang.String; import java.util.Objects; @@ -19,41 +20,233 @@ import java.util.Optional; public class Role { + /** + * The ID of the tag or actor. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + /** + * The filter used to find the actor or tag. + */ + @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; + /** + * Unique identifier for the tag. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tagKey") + private Optional tagKey; + + /** + * The role of the actor or tag in the media. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("role") + private Optional role; + @JsonCreator public Role( - @JsonProperty("tag") Optional tag) { + @JsonProperty("id") Optional id, + @JsonProperty("filter") Optional filter, + @JsonProperty("thumb") Optional thumb, + @JsonProperty("tag") Optional tag, + @JsonProperty("tagKey") Optional tagKey, + @JsonProperty("role") Optional role) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(filter, "filter"); + Utils.checkNotNull(thumb, "thumb"); Utils.checkNotNull(tag, "tag"); + Utils.checkNotNull(tagKey, "tagKey"); + Utils.checkNotNull(role, "role"); + this.id = id; + this.filter = filter; + this.thumb = thumb; this.tag = tag; + this.tagKey = tagKey; + this.role = role; } public Role() { - this(Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); } + /** + * The ID of the tag or actor. + */ + @JsonIgnore + public Optional id() { + return id; + } + + /** + * The filter used to find the actor or tag. + */ + @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() { return tag; } + /** + * Unique identifier for the tag. + */ + @JsonIgnore + public Optional tagKey() { + return tagKey; + } + + /** + * The role of the actor or tag in the media. + */ + @JsonIgnore + public Optional role() { + return role; + } + public final static Builder builder() { return new Builder(); } + /** + * The ID of the tag or actor. + */ + public Role withId(long id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + /** + * The ID of the tag or actor. + */ + public Role withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * The filter used to find the actor or tag. + */ + public Role withFilter(String filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + /** + * The filter used to find the actor or tag. + */ + public Role withFilter(Optional filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + /** + * The thumbnail of the actor + */ + public Role withThumb(String thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = Optional.ofNullable(thumb); + return this; + } + + /** + * The thumbnail of the actor + */ + public Role withThumb(Optional thumb) { + Utils.checkNotNull(thumb, "thumb"); + this.thumb = thumb; + return this; + } + + /** + * The name of the tag or actor. + */ public Role withTag(String tag) { Utils.checkNotNull(tag, "tag"); this.tag = Optional.ofNullable(tag); return this; } + /** + * The name of the tag or actor. + */ public Role withTag(Optional tag) { Utils.checkNotNull(tag, "tag"); this.tag = tag; return this; } + + /** + * Unique identifier for the tag. + */ + public Role withTagKey(String tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = Optional.ofNullable(tagKey); + return this; + } + + /** + * Unique identifier for the tag. + */ + public Role withTagKey(Optional tagKey) { + Utils.checkNotNull(tagKey, "tagKey"); + this.tagKey = tagKey; + return this; + } + + /** + * The role of the actor or tag in the media. + */ + public Role withRole(String role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); + return this; + } + + /** + * The role of the actor or tag in the media. + */ + public Role withRole(Optional role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } @Override public boolean equals(java.lang.Object o) { @@ -65,44 +258,170 @@ public class Role { } Role other = (Role) o; return - Objects.deepEquals(this.tag, other.tag); + 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); } @Override public int hashCode() { return Objects.hash( - tag); + id, + filter, + thumb, + tag, + tagKey, + role); } @Override public String toString() { return Utils.toString(Role.class, - "tag", tag); + "id", id, + "filter", filter, + "thumb", thumb, + "tag", tag, + "tagKey", tagKey, + "role", role); } public final static class Builder { - private Optional tag = Optional.empty(); + private Optional id = Optional.empty(); + + private Optional filter = Optional.empty(); + + private Optional thumb = Optional.empty(); + + private Optional tag = Optional.empty(); + + private Optional tagKey = Optional.empty(); + + private Optional role = Optional.empty(); private Builder() { // force use of static builder() method } + /** + * The ID of the tag or actor. + */ + 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) { + 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. + */ 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. + */ + public Builder role(String role) { + Utils.checkNotNull(role, "role"); + this.role = Optional.ofNullable(role); + return this; + } + + /** + * The role of the actor or tag in the media. + */ + public Builder role(Optional role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } public Role build() { return new Role( - tag); + id, + filter, + thumb, + tag, + tagKey, + role); } } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SDKMethodInterfaces.java b/src/main/java/dev/plexapi/sdk/models/operations/SDKMethodInterfaces.java index b2575d03..200ed351 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/SDKMethodInterfaces.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/SDKMethodInterfaces.java @@ -6,7 +6,6 @@ package dev.plexapi.sdk.models.operations; import java.lang.Double; import java.lang.Exception; -import java.lang.Integer; import java.lang.Long; import java.lang.String; import java.util.Optional; @@ -196,6 +195,12 @@ public class SDKMethodInterfaces { } + public interface MethodCallGetRecentlyAdded { + GetRecentlyAddedResponse getRecentlyAdded( + GetRecentlyAddedRequest request) throws Exception; + } + + public interface MethodCallGetLibraryHubs { GetLibraryHubsResponse getLibraryHubs( double sectionId, @@ -233,10 +238,9 @@ public class SDKMethodInterfaces { } - public interface MethodCallGetRecentlyAdded { - GetRecentlyAddedResponse getRecentlyAdded( - Optional xPlexContainerStart, - Optional xPlexContainerSize) throws Exception; + public interface MethodCallGetRecentlyAddedLibrary { + GetRecentlyAddedLibraryResponse getRecentlyAddedLibrary( + GetRecentlyAddedLibraryRequest request) throws Exception; } @@ -274,7 +278,7 @@ public class SDKMethodInterfaces { public interface MethodCallGetSearchLibrary { GetSearchLibraryResponse getSearchLibrary( int sectionKey, - QueryParamType type) throws Exception; + GetSearchLibraryQueryParamType type) throws Exception; } @@ -412,7 +416,7 @@ public class SDKMethodInterfaces { public interface MethodCallPostUsersSignInData { PostUsersSignInDataResponse postUsersSignInData( - Optional request, + PostUsersSignInDataRequest request, Optional serverURL) throws Exception; } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/Sort.java b/src/main/java/dev/plexapi/sdk/models/operations/Sort.java index 75e3da94..6e49242a 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/Sort.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/Sort.java @@ -10,9 +10,13 @@ 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; @@ -23,9 +27,25 @@ public class Sort { @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; + private Optional defaultDirection; @JsonInclude(Include.NON_ABSENT) @JsonProperty("descKey") @@ -35,29 +55,33 @@ public class Sort { @JsonProperty("firstCharacterKey") private Optional firstCharacterKey; - @JsonInclude(Include.NON_ABSENT) @JsonProperty("key") - private Optional key; + private String key; - @JsonInclude(Include.NON_ABSENT) @JsonProperty("title") - private Optional title; + private String title; @JsonCreator public Sort( @JsonProperty("default") Optional default_, - @JsonProperty("defaultDirection") Optional defaultDirection, + @JsonProperty("active") Optional active, + @JsonProperty("activeDirection") Optional activeDirection, + @JsonProperty("defaultDirection") Optional defaultDirection, @JsonProperty("descKey") Optional descKey, @JsonProperty("firstCharacterKey") Optional firstCharacterKey, - @JsonProperty("key") Optional key, - @JsonProperty("title") Optional title) { + @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; @@ -65,8 +89,10 @@ public class Sort { this.title = title; } - public Sort() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + public Sort( + String key, + String title) { + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), key, title); } @JsonIgnore @@ -75,8 +101,28 @@ public class Sort { } @JsonIgnore - public Optional defaultDirection() { - return defaultDirection; + 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 @@ -90,12 +136,12 @@ public class Sort { } @JsonIgnore - public Optional key() { + public String key() { return key; } @JsonIgnore - public Optional title() { + public String title() { return title; } @@ -115,13 +161,53 @@ public class Sort { return this; } - public Sort withDefaultDirection(String defaultDirection) { + public Sort withActive(boolean active) { + Utils.checkNotNull(active, "active"); + this.active = Optional.ofNullable(active); + return this; + } + + public Sort withActive(Optional active) { + Utils.checkNotNull(active, "active"); + this.active = active; + return this; + } + + /** + * The direction of the sort. Can be either `asc` or `desc`. + * + */ + public Sort withActiveDirection(ActiveDirection activeDirection) { + Utils.checkNotNull(activeDirection, "activeDirection"); + this.activeDirection = Optional.ofNullable(activeDirection); + return this; + } + + /** + * The direction of the sort. Can be either `asc` or `desc`. + * + */ + public Sort withActiveDirection(Optional activeDirection) { + Utils.checkNotNull(activeDirection, "activeDirection"); + this.activeDirection = activeDirection; + return this; + } + + /** + * The direction of the sort. Can be either `asc` or `desc`. + * + */ + public Sort withDefaultDirection(DefaultDirection defaultDirection) { Utils.checkNotNull(defaultDirection, "defaultDirection"); this.defaultDirection = Optional.ofNullable(defaultDirection); return this; } - public Sort withDefaultDirection(Optional defaultDirection) { + /** + * The direction of the sort. Can be either `asc` or `desc`. + * + */ + public Sort withDefaultDirection(Optional defaultDirection) { Utils.checkNotNull(defaultDirection, "defaultDirection"); this.defaultDirection = defaultDirection; return this; @@ -152,24 +238,12 @@ public class Sort { } public Sort withKey(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - public Sort withKey(Optional key) { Utils.checkNotNull(key, "key"); this.key = key; return this; } public Sort withTitle(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - public Sort withTitle(Optional title) { Utils.checkNotNull(title, "title"); this.title = title; return this; @@ -186,6 +260,8 @@ public class Sort { Sort other = (Sort) 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) && @@ -197,6 +273,8 @@ public class Sort { public int hashCode() { return Objects.hash( default_, + active, + activeDirection, defaultDirection, descKey, firstCharacterKey, @@ -208,6 +286,8 @@ public class Sort { public String toString() { return Utils.toString(Sort.class, "default_", default_, + "active", active, + "activeDirection", activeDirection, "defaultDirection", defaultDirection, "descKey", descKey, "firstCharacterKey", firstCharacterKey, @@ -219,15 +299,19 @@ public class Sort { private Optional default_ = Optional.empty(); - private Optional defaultDirection = Optional.empty(); + private Optional active = Optional.empty(); + + private Optional activeDirection; + + private Optional defaultDirection; private Optional descKey = Optional.empty(); private Optional firstCharacterKey = Optional.empty(); - private Optional key = Optional.empty(); + private String key; - private Optional title = Optional.empty(); + private String title; private Builder() { // force use of static builder() method @@ -245,13 +329,53 @@ public class Sort { return this; } - public Builder defaultDirection(String defaultDirection) { + 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(ActiveDirection 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(DefaultDirection defaultDirection) { Utils.checkNotNull(defaultDirection, "defaultDirection"); this.defaultDirection = Optional.ofNullable(defaultDirection); return this; } - public Builder defaultDirection(Optional defaultDirection) { + /** + * 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; @@ -282,38 +406,45 @@ public class Sort { } public Builder key(String key) { - Utils.checkNotNull(key, "key"); - this.key = Optional.ofNullable(key); - return this; - } - - public Builder key(Optional key) { Utils.checkNotNull(key, "key"); this.key = key; return this; } public Builder title(String title) { - Utils.checkNotNull(title, "title"); - this.title = Optional.ofNullable(title); - return this; - } - - public Builder title(Optional title) { Utils.checkNotNull(title, "title"); this.title = title; return this; } public Sort build() { - return new Sort( + if (activeDirection == null) { + activeDirection = _SINGLETON_VALUE_ActiveDirection.value(); + } + if (defaultDirection == null) { + defaultDirection = _SINGLETON_VALUE_DefaultDirection.value(); + } return new Sort( 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/Stream.java b/src/main/java/dev/plexapi/sdk/models/operations/Stream.java index cd67b62c..8525a03c 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/Stream.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/Stream.java @@ -12,7 +12,8 @@ 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.Integer; +import java.lang.Double; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -21,785 +22,1304 @@ import java.util.Optional; public class Stream { - @JsonInclude(Include.NON_ABSENT) @JsonProperty("id") - private Optional id; + private long id; - @JsonInclude(Include.NON_ABSENT) + /** + * Type of stream (1 = video, 2 = audio, 3 = subtitle) + */ @JsonProperty("streamType") - private Optional 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 Optional codec; + private String codec; - @JsonInclude(Include.NON_ABSENT) + /** + * The index of the stream + */ @JsonProperty("index") - private Optional index; + private long index; + /** + * The bitrate of the stream in kbps + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("bitrate") - private Optional bitrate; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("bitDepth") - private Optional bitDepth; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("chromaLocation") - private Optional chromaLocation; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("chromaSubsampling") - private Optional chromaSubsampling; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("codedHeight") - private Optional codedHeight; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("codedWidth") - private Optional codedWidth; + 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; + 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("height") - private Optional height; + @JsonProperty("hearingImpaired") + private Optional hearingImpaired; @JsonInclude(Include.NON_ABSENT) - @JsonProperty("level") - private Optional level; + @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; + private Optional refFrames; + /** + * The scan type (progressive or interlaced) + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("scanType") private Optional scanType; - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("streamIdentifier") - private Optional streamIdentifier; - + /** + * The width of the video stream + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("width") - private Optional 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; - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("selected") - private Optional selected; - + /** + * Number of audio channels (for audio streams) + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("channels") - private Optional 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; + 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 Stream( - @JsonProperty("id") Optional id, - @JsonProperty("streamType") Optional streamType, + @JsonProperty("id") long id, + @JsonProperty("streamType") long streamType, @JsonProperty("default") Optional default_, - @JsonProperty("codec") Optional codec, - @JsonProperty("index") Optional index, - @JsonProperty("bitrate") Optional bitrate, - @JsonProperty("bitDepth") Optional bitDepth, - @JsonProperty("chromaLocation") Optional chromaLocation, - @JsonProperty("chromaSubsampling") Optional chromaSubsampling, - @JsonProperty("codedHeight") Optional codedHeight, - @JsonProperty("codedWidth") Optional codedWidth, + @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("frameRate") Optional frameRate, - @JsonProperty("hasScalingMatrix") Optional hasScalingMatrix, - @JsonProperty("height") Optional height, - @JsonProperty("level") Optional level, - @JsonProperty("profile") Optional profile, - @JsonProperty("refFrames") Optional refFrames, - @JsonProperty("scanType") Optional scanType, + @JsonProperty("bitDepth") Optional bitDepth, + @JsonProperty("chromaLocation") Optional chromaLocation, @JsonProperty("streamIdentifier") Optional streamIdentifier, - @JsonProperty("width") Optional width, + @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("selected") Optional selected, - @JsonProperty("channels") Optional channels, + @JsonProperty("channels") Optional channels, @JsonProperty("language") Optional language, @JsonProperty("languageTag") Optional languageTag, @JsonProperty("languageCode") Optional languageCode, - @JsonProperty("samplingRate") Optional samplingRate) { + @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(bitDepth, "bitDepth"); - Utils.checkNotNull(chromaLocation, "chromaLocation"); - Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); - Utils.checkNotNull(codedHeight, "codedHeight"); - Utils.checkNotNull(codedWidth, "codedWidth"); 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(streamIdentifier, "streamIdentifier"); Utils.checkNotNull(width, "width"); Utils.checkNotNull(displayTitle, "displayTitle"); Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); - Utils.checkNotNull(selected, "selected"); 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.bitDepth = bitDepth; - this.chromaLocation = chromaLocation; - this.chromaSubsampling = chromaSubsampling; - this.codedHeight = codedHeight; - this.codedWidth = codedWidth; 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.streamIdentifier = streamIdentifier; this.width = width; this.displayTitle = displayTitle; this.extendedDisplayTitle = extendedDisplayTitle; - this.selected = selected; 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 Stream() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + public Stream( + 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 Optional id() { + public long id() { return id; } + /** + * Type of stream (1 = video, 2 = audio, 3 = subtitle) + */ @JsonIgnore - public Optional streamType() { + 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 codec() { + public Optional selected() { + return selected; + } + + /** + * Codec used by the stream + */ + @JsonIgnore + public String codec() { return codec; } + /** + * The index of the stream + */ @JsonIgnore - public Optional index() { + public long index() { return index; } + /** + * The bitrate of the stream in kbps + */ @JsonIgnore - public Optional bitrate() { + public Optional bitrate() { return bitrate; } - @JsonIgnore - public Optional bitDepth() { - return bitDepth; - } - - @JsonIgnore - public Optional chromaLocation() { - return chromaLocation; - } - - @JsonIgnore - public Optional chromaSubsampling() { - return chromaSubsampling; - } - - @JsonIgnore - public Optional codedHeight() { - return codedHeight; - } - - @JsonIgnore - public Optional codedWidth() { - return codedWidth; - } - + /** + * 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 frameRate() { + 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 height() { - return height; + public Optional hearingImpaired() { + return hearingImpaired; } @JsonIgnore - public Optional level() { + 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() { + 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 streamIdentifier() { - return streamIdentifier; - } - - @JsonIgnore - public Optional width() { + 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 selected() { - return selected; - } - - @JsonIgnore - public Optional channels() { + 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 samplingRate() { + 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 Stream withId(int id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - public Stream withId(Optional id) { + public Stream withId(long id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } - public Stream withStreamType(int streamType) { - Utils.checkNotNull(streamType, "streamType"); - this.streamType = Optional.ofNullable(streamType); - return this; - } - - public Stream withStreamType(Optional streamType) { + /** + * Type of stream (1 = video, 2 = audio, 3 = subtitle) + */ + public Stream withStreamType(long streamType) { Utils.checkNotNull(streamType, "streamType"); this.streamType = streamType; return this; } + /** + * Indicates if this is the default stream + */ public Stream withDefault(boolean default_) { Utils.checkNotNull(default_, "default_"); this.default_ = Optional.ofNullable(default_); return this; } + /** + * Indicates if this is the default stream + */ public Stream withDefault(Optional default_) { Utils.checkNotNull(default_, "default_"); this.default_ = default_; return this; } - public Stream withCodec(String codec) { - Utils.checkNotNull(codec, "codec"); - this.codec = Optional.ofNullable(codec); - return this; - } - - public Stream withCodec(Optional codec) { - Utils.checkNotNull(codec, "codec"); - this.codec = codec; - return this; - } - - public Stream withIndex(int index) { - Utils.checkNotNull(index, "index"); - this.index = Optional.ofNullable(index); - return this; - } - - public Stream withIndex(Optional index) { - Utils.checkNotNull(index, "index"); - this.index = index; - return this; - } - - public Stream withBitrate(int bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = Optional.ofNullable(bitrate); - return this; - } - - public Stream withBitrate(Optional bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = bitrate; - return this; - } - - public Stream withBitDepth(int bitDepth) { - Utils.checkNotNull(bitDepth, "bitDepth"); - this.bitDepth = Optional.ofNullable(bitDepth); - return this; - } - - public Stream withBitDepth(Optional bitDepth) { - Utils.checkNotNull(bitDepth, "bitDepth"); - this.bitDepth = bitDepth; - return this; - } - - public Stream withChromaLocation(String chromaLocation) { - Utils.checkNotNull(chromaLocation, "chromaLocation"); - this.chromaLocation = Optional.ofNullable(chromaLocation); - return this; - } - - public Stream withChromaLocation(Optional chromaLocation) { - Utils.checkNotNull(chromaLocation, "chromaLocation"); - this.chromaLocation = chromaLocation; - return this; - } - - public Stream withChromaSubsampling(String chromaSubsampling) { - Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); - this.chromaSubsampling = Optional.ofNullable(chromaSubsampling); - return this; - } - - public Stream withChromaSubsampling(Optional chromaSubsampling) { - Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); - this.chromaSubsampling = chromaSubsampling; - return this; - } - - public Stream withCodedHeight(int codedHeight) { - Utils.checkNotNull(codedHeight, "codedHeight"); - this.codedHeight = Optional.ofNullable(codedHeight); - return this; - } - - public Stream withCodedHeight(Optional codedHeight) { - Utils.checkNotNull(codedHeight, "codedHeight"); - this.codedHeight = codedHeight; - return this; - } - - public Stream withCodedWidth(int codedWidth) { - Utils.checkNotNull(codedWidth, "codedWidth"); - this.codedWidth = Optional.ofNullable(codedWidth); - return this; - } - - public Stream withCodedWidth(Optional codedWidth) { - Utils.checkNotNull(codedWidth, "codedWidth"); - this.codedWidth = codedWidth; - return this; - } - - public Stream withColorPrimaries(String colorPrimaries) { - Utils.checkNotNull(colorPrimaries, "colorPrimaries"); - this.colorPrimaries = Optional.ofNullable(colorPrimaries); - return this; - } - - public Stream withColorPrimaries(Optional colorPrimaries) { - Utils.checkNotNull(colorPrimaries, "colorPrimaries"); - this.colorPrimaries = colorPrimaries; - return this; - } - - public Stream withColorRange(String colorRange) { - Utils.checkNotNull(colorRange, "colorRange"); - this.colorRange = Optional.ofNullable(colorRange); - return this; - } - - public Stream withColorRange(Optional colorRange) { - Utils.checkNotNull(colorRange, "colorRange"); - this.colorRange = colorRange; - return this; - } - - public Stream withColorSpace(String colorSpace) { - Utils.checkNotNull(colorSpace, "colorSpace"); - this.colorSpace = Optional.ofNullable(colorSpace); - return this; - } - - public Stream withColorSpace(Optional colorSpace) { - Utils.checkNotNull(colorSpace, "colorSpace"); - this.colorSpace = colorSpace; - return this; - } - - public Stream withColorTrc(String colorTrc) { - Utils.checkNotNull(colorTrc, "colorTrc"); - this.colorTrc = Optional.ofNullable(colorTrc); - return this; - } - - public Stream withColorTrc(Optional colorTrc) { - Utils.checkNotNull(colorTrc, "colorTrc"); - this.colorTrc = colorTrc; - return this; - } - - public Stream withFrameRate(int frameRate) { - Utils.checkNotNull(frameRate, "frameRate"); - this.frameRate = Optional.ofNullable(frameRate); - return this; - } - - public Stream withFrameRate(Optional frameRate) { - Utils.checkNotNull(frameRate, "frameRate"); - this.frameRate = frameRate; - return this; - } - - public Stream withHasScalingMatrix(boolean hasScalingMatrix) { - Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); - this.hasScalingMatrix = Optional.ofNullable(hasScalingMatrix); - return this; - } - - public Stream withHasScalingMatrix(Optional hasScalingMatrix) { - Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); - this.hasScalingMatrix = hasScalingMatrix; - return this; - } - - public Stream withHeight(int height) { - Utils.checkNotNull(height, "height"); - this.height = Optional.ofNullable(height); - return this; - } - - public Stream withHeight(Optional height) { - Utils.checkNotNull(height, "height"); - this.height = height; - return this; - } - - public Stream withLevel(int level) { - Utils.checkNotNull(level, "level"); - this.level = Optional.ofNullable(level); - return this; - } - - public Stream withLevel(Optional level) { - Utils.checkNotNull(level, "level"); - this.level = level; - return this; - } - - public Stream withProfile(String profile) { - Utils.checkNotNull(profile, "profile"); - this.profile = Optional.ofNullable(profile); - return this; - } - - public Stream withProfile(Optional profile) { - Utils.checkNotNull(profile, "profile"); - this.profile = profile; - return this; - } - - public Stream withRefFrames(int refFrames) { - Utils.checkNotNull(refFrames, "refFrames"); - this.refFrames = Optional.ofNullable(refFrames); - return this; - } - - public Stream withRefFrames(Optional refFrames) { - Utils.checkNotNull(refFrames, "refFrames"); - this.refFrames = refFrames; - return this; - } - - public Stream withScanType(String scanType) { - Utils.checkNotNull(scanType, "scanType"); - this.scanType = Optional.ofNullable(scanType); - return this; - } - - public Stream withScanType(Optional scanType) { - Utils.checkNotNull(scanType, "scanType"); - this.scanType = scanType; - return this; - } - - public Stream withStreamIdentifier(String streamIdentifier) { - Utils.checkNotNull(streamIdentifier, "streamIdentifier"); - this.streamIdentifier = Optional.ofNullable(streamIdentifier); - return this; - } - - public Stream withStreamIdentifier(Optional streamIdentifier) { - Utils.checkNotNull(streamIdentifier, "streamIdentifier"); - this.streamIdentifier = streamIdentifier; - return this; - } - - public Stream withWidth(int width) { - Utils.checkNotNull(width, "width"); - this.width = Optional.ofNullable(width); - return this; - } - - public Stream withWidth(Optional width) { - Utils.checkNotNull(width, "width"); - this.width = width; - return this; - } - - public Stream withDisplayTitle(String displayTitle) { - Utils.checkNotNull(displayTitle, "displayTitle"); - this.displayTitle = Optional.ofNullable(displayTitle); - return this; - } - - public Stream withDisplayTitle(Optional displayTitle) { - Utils.checkNotNull(displayTitle, "displayTitle"); - this.displayTitle = displayTitle; - return this; - } - - public Stream withExtendedDisplayTitle(String extendedDisplayTitle) { - Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); - this.extendedDisplayTitle = Optional.ofNullable(extendedDisplayTitle); - return this; - } - - public Stream withExtendedDisplayTitle(Optional extendedDisplayTitle) { - Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); - this.extendedDisplayTitle = extendedDisplayTitle; - return this; - } - + /** + * Indicates if the stream is selected + */ public Stream withSelected(boolean selected) { Utils.checkNotNull(selected, "selected"); this.selected = Optional.ofNullable(selected); return this; } + /** + * Indicates if the stream is selected + */ public Stream withSelected(Optional selected) { Utils.checkNotNull(selected, "selected"); this.selected = selected; return this; } - public Stream withChannels(int channels) { + /** + * Codec used by the stream + */ + public Stream withCodec(String codec) { + Utils.checkNotNull(codec, "codec"); + this.codec = codec; + return this; + } + + /** + * The index of the stream + */ + public Stream withIndex(long index) { + Utils.checkNotNull(index, "index"); + this.index = index; + return this; + } + + /** + * The bitrate of the stream in kbps + */ + public Stream withBitrate(long bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = Optional.ofNullable(bitrate); + return this; + } + + /** + * The bitrate of the stream in kbps + */ + public Stream withBitrate(Optional bitrate) { + Utils.checkNotNull(bitrate, "bitrate"); + this.bitrate = bitrate; + return this; + } + + /** + * The color primaries of the video stream + */ + public Stream withColorPrimaries(String colorPrimaries) { + Utils.checkNotNull(colorPrimaries, "colorPrimaries"); + this.colorPrimaries = Optional.ofNullable(colorPrimaries); + return this; + } + + /** + * The color primaries of the video stream + */ + public Stream withColorPrimaries(Optional colorPrimaries) { + Utils.checkNotNull(colorPrimaries, "colorPrimaries"); + this.colorPrimaries = colorPrimaries; + return this; + } + + /** + * The color range of the video stream + */ + public Stream withColorRange(String colorRange) { + Utils.checkNotNull(colorRange, "colorRange"); + this.colorRange = Optional.ofNullable(colorRange); + return this; + } + + /** + * The color range of the video stream + */ + public Stream withColorRange(Optional colorRange) { + Utils.checkNotNull(colorRange, "colorRange"); + this.colorRange = colorRange; + return this; + } + + /** + * The color space of the video stream + */ + public Stream withColorSpace(String colorSpace) { + Utils.checkNotNull(colorSpace, "colorSpace"); + this.colorSpace = Optional.ofNullable(colorSpace); + return this; + } + + /** + * The color space of the video stream + */ + public Stream withColorSpace(Optional colorSpace) { + Utils.checkNotNull(colorSpace, "colorSpace"); + this.colorSpace = colorSpace; + return this; + } + + /** + * The transfer characteristics (TRC) of the video stream + */ + public Stream withColorTrc(String colorTrc) { + Utils.checkNotNull(colorTrc, "colorTrc"); + this.colorTrc = Optional.ofNullable(colorTrc); + return this; + } + + /** + * The transfer characteristics (TRC) of the video stream + */ + public Stream withColorTrc(Optional colorTrc) { + Utils.checkNotNull(colorTrc, "colorTrc"); + this.colorTrc = colorTrc; + return this; + } + + /** + * The bit depth of the video stream + */ + public Stream withBitDepth(long bitDepth) { + Utils.checkNotNull(bitDepth, "bitDepth"); + this.bitDepth = Optional.ofNullable(bitDepth); + return this; + } + + /** + * The bit depth of the video stream + */ + public Stream withBitDepth(Optional bitDepth) { + Utils.checkNotNull(bitDepth, "bitDepth"); + this.bitDepth = bitDepth; + return this; + } + + /** + * The chroma location of the video stream + */ + public Stream withChromaLocation(String chromaLocation) { + Utils.checkNotNull(chromaLocation, "chromaLocation"); + this.chromaLocation = Optional.ofNullable(chromaLocation); + return this; + } + + /** + * The chroma location of the video stream + */ + public Stream withChromaLocation(Optional chromaLocation) { + Utils.checkNotNull(chromaLocation, "chromaLocation"); + this.chromaLocation = chromaLocation; + return this; + } + + /** + * The identifier of the video stream + */ + public Stream withStreamIdentifier(String streamIdentifier) { + Utils.checkNotNull(streamIdentifier, "streamIdentifier"); + this.streamIdentifier = Optional.ofNullable(streamIdentifier); + return this; + } + + /** + * The identifier of the video stream + */ + public Stream withStreamIdentifier(Optional streamIdentifier) { + Utils.checkNotNull(streamIdentifier, "streamIdentifier"); + this.streamIdentifier = streamIdentifier; + return this; + } + + /** + * The chroma subsampling format + */ + public Stream withChromaSubsampling(String chromaSubsampling) { + Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); + this.chromaSubsampling = Optional.ofNullable(chromaSubsampling); + return this; + } + + /** + * The chroma subsampling format + */ + public Stream withChromaSubsampling(Optional chromaSubsampling) { + Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); + this.chromaSubsampling = chromaSubsampling; + return this; + } + + /** + * The coded height of the video stream + */ + public Stream withCodedHeight(long codedHeight) { + Utils.checkNotNull(codedHeight, "codedHeight"); + this.codedHeight = Optional.ofNullable(codedHeight); + return this; + } + + /** + * The coded height of the video stream + */ + public Stream withCodedHeight(Optional codedHeight) { + Utils.checkNotNull(codedHeight, "codedHeight"); + this.codedHeight = codedHeight; + return this; + } + + /** + * The coded width of the video stream + */ + public Stream withCodedWidth(long codedWidth) { + Utils.checkNotNull(codedWidth, "codedWidth"); + this.codedWidth = Optional.ofNullable(codedWidth); + return this; + } + + /** + * The coded width of the video stream + */ + public Stream withCodedWidth(Optional codedWidth) { + Utils.checkNotNull(codedWidth, "codedWidth"); + this.codedWidth = codedWidth; + return this; + } + + /** + * The frame rate of the video stream + */ + public Stream withFrameRate(double frameRate) { + Utils.checkNotNull(frameRate, "frameRate"); + this.frameRate = Optional.ofNullable(frameRate); + return this; + } + + /** + * The frame rate of the video stream + */ + public Stream withFrameRate(Optional frameRate) { + Utils.checkNotNull(frameRate, "frameRate"); + this.frameRate = frameRate; + return this; + } + + /** + * Indicates if the stream has a scaling matrix + */ + public Stream withHasScalingMatrix(boolean hasScalingMatrix) { + Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); + this.hasScalingMatrix = Optional.ofNullable(hasScalingMatrix); + return this; + } + + /** + * Indicates if the stream has a scaling matrix + */ + public Stream withHasScalingMatrix(Optional hasScalingMatrix) { + Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); + this.hasScalingMatrix = hasScalingMatrix; + return this; + } + + public Stream withHearingImpaired(boolean hearingImpaired) { + Utils.checkNotNull(hearingImpaired, "hearingImpaired"); + this.hearingImpaired = Optional.ofNullable(hearingImpaired); + return this; + } + + public Stream withHearingImpaired(Optional hearingImpaired) { + Utils.checkNotNull(hearingImpaired, "hearingImpaired"); + this.hearingImpaired = hearingImpaired; + return this; + } + + public Stream withClosedCaptions(boolean closedCaptions) { + Utils.checkNotNull(closedCaptions, "closedCaptions"); + this.closedCaptions = Optional.ofNullable(closedCaptions); + return this; + } + + public Stream withClosedCaptions(Optional closedCaptions) { + Utils.checkNotNull(closedCaptions, "closedCaptions"); + this.closedCaptions = closedCaptions; + return this; + } + + public Stream withEmbeddedInVideo(String embeddedInVideo) { + Utils.checkNotNull(embeddedInVideo, "embeddedInVideo"); + this.embeddedInVideo = Optional.ofNullable(embeddedInVideo); + return this; + } + + public Stream withEmbeddedInVideo(Optional embeddedInVideo) { + Utils.checkNotNull(embeddedInVideo, "embeddedInVideo"); + this.embeddedInVideo = embeddedInVideo; + return this; + } + + /** + * The height of the video stream + */ + public Stream withHeight(long height) { + Utils.checkNotNull(height, "height"); + this.height = Optional.ofNullable(height); + return this; + } + + /** + * The height of the video stream + */ + public Stream withHeight(Optional height) { + Utils.checkNotNull(height, "height"); + this.height = height; + return this; + } + + /** + * The level of the video codec + */ + public Stream withLevel(long level) { + Utils.checkNotNull(level, "level"); + this.level = Optional.ofNullable(level); + return this; + } + + /** + * The level of the video codec + */ + public Stream withLevel(Optional level) { + Utils.checkNotNull(level, "level"); + this.level = level; + return this; + } + + /** + * The profile of the video codec + */ + public Stream withProfile(String profile) { + Utils.checkNotNull(profile, "profile"); + this.profile = Optional.ofNullable(profile); + return this; + } + + /** + * The profile of the video codec + */ + public Stream withProfile(Optional profile) { + Utils.checkNotNull(profile, "profile"); + this.profile = profile; + return this; + } + + /** + * Number of reference frames + */ + public Stream withRefFrames(long refFrames) { + Utils.checkNotNull(refFrames, "refFrames"); + this.refFrames = Optional.ofNullable(refFrames); + return this; + } + + /** + * Number of reference frames + */ + public Stream withRefFrames(Optional refFrames) { + Utils.checkNotNull(refFrames, "refFrames"); + this.refFrames = refFrames; + return this; + } + + /** + * The scan type (progressive or interlaced) + */ + public Stream withScanType(String scanType) { + Utils.checkNotNull(scanType, "scanType"); + this.scanType = Optional.ofNullable(scanType); + return this; + } + + /** + * The scan type (progressive or interlaced) + */ + public Stream withScanType(Optional scanType) { + Utils.checkNotNull(scanType, "scanType"); + this.scanType = scanType; + return this; + } + + /** + * The width of the video stream + */ + public Stream withWidth(long width) { + Utils.checkNotNull(width, "width"); + this.width = Optional.ofNullable(width); + return this; + } + + /** + * The width of the video stream + */ + public Stream withWidth(Optional width) { + Utils.checkNotNull(width, "width"); + this.width = width; + return this; + } + + /** + * Display title of the stream + */ + public Stream withDisplayTitle(String displayTitle) { + Utils.checkNotNull(displayTitle, "displayTitle"); + this.displayTitle = Optional.ofNullable(displayTitle); + return this; + } + + /** + * Display title of the stream + */ + public Stream withDisplayTitle(Optional displayTitle) { + Utils.checkNotNull(displayTitle, "displayTitle"); + this.displayTitle = displayTitle; + return this; + } + + /** + * Extended display title of the stream + */ + public Stream withExtendedDisplayTitle(String extendedDisplayTitle) { + Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); + this.extendedDisplayTitle = Optional.ofNullable(extendedDisplayTitle); + return this; + } + + /** + * Extended display title of the stream + */ + public Stream withExtendedDisplayTitle(Optional extendedDisplayTitle) { + Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); + this.extendedDisplayTitle = extendedDisplayTitle; + return this; + } + + /** + * Number of audio channels (for audio streams) + */ + public Stream withChannels(long channels) { Utils.checkNotNull(channels, "channels"); this.channels = Optional.ofNullable(channels); return this; } - public Stream withChannels(Optional channels) { + /** + * Number of audio channels (for audio streams) + */ + public Stream withChannels(Optional channels) { Utils.checkNotNull(channels, "channels"); this.channels = channels; return this; } + /** + * The language of the stream (for audio/subtitle streams) + */ public Stream withLanguage(String language) { Utils.checkNotNull(language, "language"); this.language = Optional.ofNullable(language); return this; } + /** + * The language of the stream (for audio/subtitle streams) + */ public Stream withLanguage(Optional language) { Utils.checkNotNull(language, "language"); this.language = language; return this; } + /** + * Language tag of the stream + */ public Stream withLanguageTag(String languageTag) { Utils.checkNotNull(languageTag, "languageTag"); this.languageTag = Optional.ofNullable(languageTag); return this; } + /** + * Language tag of the stream + */ public Stream withLanguageTag(Optional languageTag) { Utils.checkNotNull(languageTag, "languageTag"); this.languageTag = languageTag; return this; } + /** + * Language code of the stream + */ public Stream withLanguageCode(String languageCode) { Utils.checkNotNull(languageCode, "languageCode"); this.languageCode = Optional.ofNullable(languageCode); return this; } + /** + * Language code of the stream + */ public Stream withLanguageCode(Optional languageCode) { Utils.checkNotNull(languageCode, "languageCode"); this.languageCode = languageCode; return this; } - public Stream withSamplingRate(int samplingRate) { + /** + * The audio channel layout + */ + public Stream withAudioChannelLayout(String audioChannelLayout) { + Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); + this.audioChannelLayout = Optional.ofNullable(audioChannelLayout); + return this; + } + + /** + * The audio channel layout + */ + public Stream withAudioChannelLayout(Optional audioChannelLayout) { + Utils.checkNotNull(audioChannelLayout, "audioChannelLayout"); + this.audioChannelLayout = audioChannelLayout; + return this; + } + + /** + * Sampling rate of the audio stream in Hz + */ + public Stream withSamplingRate(long samplingRate) { Utils.checkNotNull(samplingRate, "samplingRate"); this.samplingRate = Optional.ofNullable(samplingRate); return this; } - public Stream withSamplingRate(Optional samplingRate) { + /** + * Sampling rate of the audio stream in Hz + */ + public Stream withSamplingRate(Optional samplingRate) { Utils.checkNotNull(samplingRate, "samplingRate"); this.samplingRate = samplingRate; return this; } + + /** + * Title of the subtitle track (for subtitle streams) + */ + public Stream withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = Optional.ofNullable(title); + return this; + } + + /** + * Title of the subtitle track (for subtitle streams) + */ + public Stream withTitle(Optional title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + /** + * Indicates if the subtitle stream can auto-sync + */ + public Stream withCanAutoSync(boolean canAutoSync) { + Utils.checkNotNull(canAutoSync, "canAutoSync"); + this.canAutoSync = Optional.ofNullable(canAutoSync); + return this; + } + + /** + * Indicates if the subtitle stream can auto-sync + */ + public Stream withCanAutoSync(Optional canAutoSync) { + Utils.checkNotNull(canAutoSync, "canAutoSync"); + this.canAutoSync = canAutoSync; + return this; + } @Override public boolean equals(java.lang.Object o) { @@ -814,35 +1334,41 @@ public class Stream { 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.bitDepth, other.bitDepth) && - Objects.deepEquals(this.chromaLocation, other.chromaLocation) && - Objects.deepEquals(this.chromaSubsampling, other.chromaSubsampling) && - Objects.deepEquals(this.codedHeight, other.codedHeight) && - Objects.deepEquals(this.codedWidth, other.codedWidth) && 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.streamIdentifier, other.streamIdentifier) && Objects.deepEquals(this.width, other.width) && Objects.deepEquals(this.displayTitle, other.displayTitle) && Objects.deepEquals(this.extendedDisplayTitle, other.extendedDisplayTitle) && - Objects.deepEquals(this.selected, other.selected) && 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.samplingRate, other.samplingRate); + 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 @@ -851,35 +1377,41 @@ public class Stream { id, streamType, default_, + selected, codec, index, bitrate, - bitDepth, - chromaLocation, - chromaSubsampling, - codedHeight, - codedWidth, colorPrimaries, colorRange, colorSpace, colorTrc, + bitDepth, + chromaLocation, + streamIdentifier, + chromaSubsampling, + codedHeight, + codedWidth, frameRate, hasScalingMatrix, + hearingImpaired, + closedCaptions, + embeddedInVideo, height, level, profile, refFrames, scanType, - streamIdentifier, width, displayTitle, extendedDisplayTitle, - selected, channels, language, languageTag, languageCode, - samplingRate); + audioChannelLayout, + samplingRate, + title, + canAutoSync); } @Override @@ -888,60 +1420,58 @@ public class Stream { "id", id, "streamType", streamType, "default_", default_, + "selected", selected, "codec", codec, "index", index, "bitrate", bitrate, - "bitDepth", bitDepth, - "chromaLocation", chromaLocation, - "chromaSubsampling", chromaSubsampling, - "codedHeight", codedHeight, - "codedWidth", codedWidth, "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, - "streamIdentifier", streamIdentifier, "width", width, "displayTitle", displayTitle, "extendedDisplayTitle", extendedDisplayTitle, - "selected", selected, "channels", channels, "language", language, "languageTag", languageTag, "languageCode", languageCode, - "samplingRate", samplingRate); + "audioChannelLayout", audioChannelLayout, + "samplingRate", samplingRate, + "title", title, + "canAutoSync", canAutoSync); } public final static class Builder { - private Optional id = Optional.empty(); + private Long id; - private Optional streamType = Optional.empty(); + private Long streamType; private Optional default_ = Optional.empty(); - private Optional codec = Optional.empty(); + private Optional selected = Optional.empty(); - private Optional index = Optional.empty(); + private String codec; - private Optional bitrate = Optional.empty(); + private Long index; - private Optional bitDepth = Optional.empty(); - - private Optional chromaLocation = Optional.empty(); - - private Optional chromaSubsampling = Optional.empty(); - - private Optional codedHeight = Optional.empty(); - - private Optional codedWidth = Optional.empty(); + private Optional bitrate = Optional.empty(); private Optional colorPrimaries = Optional.empty(); @@ -951,31 +1481,45 @@ public class Stream { private Optional colorTrc = Optional.empty(); - private Optional frameRate = Optional.empty(); + private Optional bitDepth = Optional.empty(); - private Optional hasScalingMatrix = 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 chromaLocation = Optional.empty(); private Optional streamIdentifier = Optional.empty(); - private Optional width = 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 selected = Optional.empty(); - - private Optional channels = Optional.empty(); + private Optional channels = Optional.empty(); private Optional language = Optional.empty(); @@ -983,430 +1527,685 @@ public class Stream { private Optional languageCode = Optional.empty(); - private Optional samplingRate = 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(int id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - public Builder id(Optional id) { + public Builder id(long id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } - public Builder streamType(int streamType) { - Utils.checkNotNull(streamType, "streamType"); - this.streamType = Optional.ofNullable(streamType); - return this; - } - - public Builder streamType(Optional streamType) { + /** + * 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; } - public Builder codec(String codec) { - Utils.checkNotNull(codec, "codec"); - this.codec = Optional.ofNullable(codec); - return this; - } - - public Builder codec(Optional codec) { - Utils.checkNotNull(codec, "codec"); - this.codec = codec; - 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 bitrate(int bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = Optional.ofNullable(bitrate); - return this; - } - - public Builder bitrate(Optional bitrate) { - Utils.checkNotNull(bitrate, "bitrate"); - this.bitrate = bitrate; - return this; - } - - public Builder bitDepth(int bitDepth) { - Utils.checkNotNull(bitDepth, "bitDepth"); - this.bitDepth = Optional.ofNullable(bitDepth); - return this; - } - - public Builder bitDepth(Optional bitDepth) { - Utils.checkNotNull(bitDepth, "bitDepth"); - this.bitDepth = bitDepth; - return this; - } - - public Builder chromaLocation(String chromaLocation) { - Utils.checkNotNull(chromaLocation, "chromaLocation"); - this.chromaLocation = Optional.ofNullable(chromaLocation); - return this; - } - - public Builder chromaLocation(Optional chromaLocation) { - Utils.checkNotNull(chromaLocation, "chromaLocation"); - this.chromaLocation = chromaLocation; - return this; - } - - public Builder chromaSubsampling(String chromaSubsampling) { - Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); - this.chromaSubsampling = Optional.ofNullable(chromaSubsampling); - return this; - } - - public Builder chromaSubsampling(Optional chromaSubsampling) { - Utils.checkNotNull(chromaSubsampling, "chromaSubsampling"); - this.chromaSubsampling = chromaSubsampling; - return this; - } - - public Builder codedHeight(int codedHeight) { - Utils.checkNotNull(codedHeight, "codedHeight"); - this.codedHeight = Optional.ofNullable(codedHeight); - return this; - } - - public Builder codedHeight(Optional codedHeight) { - Utils.checkNotNull(codedHeight, "codedHeight"); - this.codedHeight = codedHeight; - return this; - } - - public Builder codedWidth(int codedWidth) { - Utils.checkNotNull(codedWidth, "codedWidth"); - this.codedWidth = Optional.ofNullable(codedWidth); - return this; - } - - public Builder codedWidth(Optional codedWidth) { - Utils.checkNotNull(codedWidth, "codedWidth"); - this.codedWidth = codedWidth; - return this; - } - - public Builder colorPrimaries(String colorPrimaries) { - Utils.checkNotNull(colorPrimaries, "colorPrimaries"); - this.colorPrimaries = Optional.ofNullable(colorPrimaries); - return this; - } - - public Builder colorPrimaries(Optional colorPrimaries) { - Utils.checkNotNull(colorPrimaries, "colorPrimaries"); - this.colorPrimaries = colorPrimaries; - return this; - } - - public Builder colorRange(String colorRange) { - Utils.checkNotNull(colorRange, "colorRange"); - this.colorRange = Optional.ofNullable(colorRange); - return this; - } - - public Builder colorRange(Optional colorRange) { - Utils.checkNotNull(colorRange, "colorRange"); - this.colorRange = colorRange; - return this; - } - - public Builder colorSpace(String colorSpace) { - Utils.checkNotNull(colorSpace, "colorSpace"); - this.colorSpace = Optional.ofNullable(colorSpace); - return this; - } - - public Builder colorSpace(Optional colorSpace) { - Utils.checkNotNull(colorSpace, "colorSpace"); - this.colorSpace = colorSpace; - return this; - } - - public Builder colorTrc(String colorTrc) { - Utils.checkNotNull(colorTrc, "colorTrc"); - this.colorTrc = Optional.ofNullable(colorTrc); - return this; - } - - public Builder colorTrc(Optional colorTrc) { - Utils.checkNotNull(colorTrc, "colorTrc"); - this.colorTrc = colorTrc; - return this; - } - - public Builder frameRate(int frameRate) { - Utils.checkNotNull(frameRate, "frameRate"); - this.frameRate = Optional.ofNullable(frameRate); - return this; - } - - public Builder frameRate(Optional frameRate) { - Utils.checkNotNull(frameRate, "frameRate"); - this.frameRate = frameRate; - return this; - } - - public Builder hasScalingMatrix(boolean hasScalingMatrix) { - Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); - this.hasScalingMatrix = Optional.ofNullable(hasScalingMatrix); - return this; - } - - public Builder hasScalingMatrix(Optional hasScalingMatrix) { - Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix"); - this.hasScalingMatrix = hasScalingMatrix; - return this; - } - - public Builder height(int height) { - Utils.checkNotNull(height, "height"); - this.height = Optional.ofNullable(height); - return this; - } - - public Builder height(Optional height) { - Utils.checkNotNull(height, "height"); - this.height = height; - return this; - } - - public Builder level(int level) { - Utils.checkNotNull(level, "level"); - this.level = Optional.ofNullable(level); - return this; - } - - public Builder level(Optional level) { - Utils.checkNotNull(level, "level"); - this.level = level; - return this; - } - - public Builder profile(String profile) { - Utils.checkNotNull(profile, "profile"); - this.profile = Optional.ofNullable(profile); - return this; - } - - public Builder profile(Optional profile) { - Utils.checkNotNull(profile, "profile"); - this.profile = profile; - return this; - } - - public Builder refFrames(int refFrames) { - Utils.checkNotNull(refFrames, "refFrames"); - this.refFrames = Optional.ofNullable(refFrames); - return this; - } - - public Builder refFrames(Optional refFrames) { - Utils.checkNotNull(refFrames, "refFrames"); - this.refFrames = refFrames; - return this; - } - - public Builder scanType(String scanType) { - Utils.checkNotNull(scanType, "scanType"); - this.scanType = Optional.ofNullable(scanType); - return this; - } - - public Builder scanType(Optional scanType) { - Utils.checkNotNull(scanType, "scanType"); - this.scanType = scanType; - return this; - } - - public Builder streamIdentifier(String streamIdentifier) { - Utils.checkNotNull(streamIdentifier, "streamIdentifier"); - this.streamIdentifier = Optional.ofNullable(streamIdentifier); - return this; - } - - public Builder streamIdentifier(Optional streamIdentifier) { - Utils.checkNotNull(streamIdentifier, "streamIdentifier"); - this.streamIdentifier = streamIdentifier; - return this; - } - - public Builder width(int width) { - Utils.checkNotNull(width, "width"); - this.width = Optional.ofNullable(width); - return this; - } - - public Builder width(Optional width) { - Utils.checkNotNull(width, "width"); - this.width = width; - return this; - } - - public Builder displayTitle(String displayTitle) { - Utils.checkNotNull(displayTitle, "displayTitle"); - this.displayTitle = Optional.ofNullable(displayTitle); - return this; - } - - public Builder displayTitle(Optional displayTitle) { - Utils.checkNotNull(displayTitle, "displayTitle"); - this.displayTitle = displayTitle; - return this; - } - - public Builder extendedDisplayTitle(String extendedDisplayTitle) { - Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); - this.extendedDisplayTitle = Optional.ofNullable(extendedDisplayTitle); - return this; - } - - public Builder extendedDisplayTitle(Optional extendedDisplayTitle) { - Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle"); - this.extendedDisplayTitle = extendedDisplayTitle; - 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; } - public Builder channels(int channels) { + /** + * 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; } - public Builder channels(Optional channels) { + /** + * 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; } - public Builder samplingRate(int samplingRate) { + /** + * 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; } - public Builder samplingRate(Optional samplingRate) { + /** + * 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 Stream build() { return new Stream( id, streamType, default_, + selected, codec, index, bitrate, - bitDepth, - chromaLocation, - chromaSubsampling, - codedHeight, - codedWidth, colorPrimaries, colorRange, colorSpace, colorTrc, + bitDepth, + chromaLocation, + streamIdentifier, + chromaSubsampling, + codedHeight, + codedWidth, frameRate, hasScalingMatrix, + hearingImpaired, + closedCaptions, + embeddedInVideo, height, level, profile, refFrames, scanType, - streamIdentifier, width, displayTitle, extendedDisplayTitle, - selected, channels, language, languageTag, languageCode, - samplingRate); + audioChannelLayout, + samplingRate, + title, + canAutoSync); } } } diff --git a/src/main/java/dev/plexapi/sdk/utils/Security.java b/src/main/java/dev/plexapi/sdk/utils/Security.java index e6dc43dc..e0c91bf2 100644 --- a/src/main/java/dev/plexapi/sdk/utils/Security.java +++ b/src/main/java/dev/plexapi/sdk/utils/Security.java @@ -123,7 +123,9 @@ public final class Security { request.addHeader(securityMetadata.name, Utils.prefixBearer(Utils.valToString(value))); break; case "oauth2": - request.addHeader(securityMetadata.name, Utils.prefixBearer(Utils.valToString(value))); + if (!"client_credentials".equals(schemeMetadata.subtype)) { + request.addHeader(securityMetadata.name, Utils.prefixBearer(Utils.valToString(value))); + } break; case "http": switch (schemeMetadata.subtype) {